/* thealexantonov.tech — интерактивные блоки главной: дорожки по ролям, карточка спринта, калькулятор окупаемости, бесплатные инструменты и гайд.
   Подключается только на главной поверх landing.css и использует его токены. */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- шапка: Product Track by @thealexantonov ---------- */
.brand { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.brand-by { font-weight: 400; letter-spacing: -0.01em; color: var(--muted); }
.brand:hover .brand-by { color: var(--body); }
/* длинное название в шапке: на узком десктопе ужимаем меню, чтобы кнопка «Записаться на скрининг» не вылезала за край */
@media (min-width: 900px) and (max-width: 1079px) {
  .top-row { gap: 12px; }
  .top .nav { gap: 16px; }
  .top .nav a { font-size: 14px; white-space: nowrap; }
}

/* ---------- кому подходит: дорожки ---------- */
.board { padding: 28px 28px 0; border-radius: var(--radius); background: var(--navy); color: #fff; }
.track { --n: 36px; --label: 168px; --cp1: 22%; --cp2: 42%; --cp3: 62%; --cp4: 81%; }
.track-scale, .lane { display: grid; grid-template-columns: var(--n) var(--label) minmax(0, 1fr); }
.scale-pad { grid-column: 1 / 3; padding-left: 6px; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; }
.scale-run { position: relative; height: 26px; font-size: 13px; color: var(--navy-text); }
.cp { position: absolute; top: 0; white-space: nowrap; }
.cp0 { left: 0; }
.cp1 { left: var(--cp1); transform: translateX(-50%); }
.cp2 { left: var(--cp2); transform: translateX(-50%); }
.cp3 { left: var(--cp3); transform: translateX(-50%); }
.cp4 { left: var(--cp4); transform: translateX(-50%); }
.cpf { right: 0; color: #fff; font-weight: 600; }
.lanes { border-bottom: 1px solid rgba(255, 255, 255, .12); }
/* Safari даёт кнопкам align-items: flex-start, и полоса забега схлопывается в ноль — задаём растяжение и высоту ряда явно */
.lane {
  --lane-h: 50px;
  width: 100%; min-height: var(--lane-h); margin: 0; padding: 0;
  grid-template-rows: minmax(var(--lane-h), auto); align-items: stretch;
  border: 0; border-top: 1px solid rgba(255, 255, 255, .12);
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: background-color .2s;
}
.lane:focus-visible { outline: 2px solid #9db0ff; outline-offset: -2px; border-radius: 0; }
.lane-n {
  position: relative; align-self: center; justify-self: start;
  width: 16px; height: 16px; margin-left: 6px;
  border: 1.5px solid rgba(255, 255, 255, .32); border-radius: 50%;
  transition: border-color .2s var(--ease);
}
.lane-n::after {
  content: ""; position: absolute; inset: 2.5px; border-radius: 50%;
  background: #9db0ff; transform: scale(0); transition: transform .2s var(--ease);
}
.lane-name { align-self: center; font-size: 16px; font-weight: 500; color: rgba(255, 255, 255, .72); transition: color .2s; }
.lane-run {
  position: relative; align-self: stretch;
  background-image:
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, .2) 0 3px, transparent 3px 8px),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, .2) 0 3px, transparent 3px 8px),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, .2) 0 3px, transparent 3px 8px),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, .2) 0 3px, transparent 3px 8px);
  background-size: 1px 100%;
  background-repeat: no-repeat;
  background-position: var(--cp1) 0, var(--cp2) 0, var(--cp3) 0, var(--cp4) 0;
}
.lane-run::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 3px; background: #fff; }
.lane-run i {
  position: absolute; top: 50%; left: calc(100% - 24px);
  width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .1);
}
.lane[aria-checked="true"] { background: rgba(255, 255, 255, .07); }
.lane[aria-checked="true"] .lane-n { border-color: #9db0ff; }
.lane[aria-checked="true"] .lane-n::after { transform: scale(1); }
.lane[aria-checked="true"] .lane-name { color: #fff; font-weight: 600; }
.lane[aria-checked="true"] .lane-run i { background: #9db0ff; box-shadow: 0 0 0 5px rgba(157, 176, 255, .25); }
@media (hover: hover) {
  .lane:hover { background: rgba(255, 255, 255, .035); }
  .lane:hover .lane-n { border-color: rgba(255, 255, 255, .72); }
  .lane:hover .lane-name { color: #fff; }
}

/* забег при появлении доски и повторный забег выбранной дорожки */
.ix .board .lane-run i { left: 4px; }
.ix .board.is-run .lane-run i { animation: ix-run 1.6s var(--ease) both; }
.ix .board.is-run .lane:nth-child(2) .lane-run i { animation-delay: .07s; animation-duration: 1.8s; }
.ix .board.is-run .lane:nth-child(3) .lane-run i { animation-delay: .14s; animation-duration: 1.55s; }
.ix .board.is-run .lane:nth-child(4) .lane-run i { animation-delay: .21s; animation-duration: 1.7s; }
.ix .board.is-run .lane:nth-child(5) .lane-run i { animation-delay: .28s; animation-duration: 1.6s; }
.ix .board.is-run .lane:nth-child(6) .lane-run i { animation-delay: .35s; animation-duration: 1.75s; }
.ix .board.is-run .lane:nth-child(7) .lane-run i { animation-delay: .42s; animation-duration: 1.65s; }
.ix .board.is-run .lane:nth-child(8) .lane-run i { animation-delay: .49s; animation-duration: 1.85s; }
.ix .board.is-run .lane.is-go-a .lane-run i { animation: ix-run-a .95s var(--ease) both; }
.ix .board.is-run .lane.is-go-b .lane-run i { animation: ix-run-b .95s var(--ease) both; }
@keyframes ix-run { from { left: 4px; } to { left: calc(100% - 24px); } }
@keyframes ix-run-a { from { left: 4px; } to { left: calc(100% - 24px); } }
@keyframes ix-run-b { from { left: 4px; } to { left: calc(100% - 24px); } }
@media (prefers-reduced-motion: reduce) {
  .ix .board .lane-run i,
  .ix .board.is-run .lane-run i,
  .ix .board.is-run .lane.is-go-a .lane-run i,
  .ix .board.is-run .lane.is-go-b .lane-run i { left: calc(100% - 24px); animation: none; }
}

.lane-info { padding: 28px 0 30px; transition: opacity .16s; }
.lane-info.is-swap, .tk-panel.is-swap { opacity: 0; }
.li-title { color: #fff; font-size: 22px; letter-spacing: -0.02em; }
.li-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; margin-top: 16px; }
.li-col h4 { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--navy-text); }
.li-col p { font-size: 16px; line-height: 1.55; color: #fff; }
.li-col p + p { margin-top: 10px; }
.cv-was, .cv-now { display: flex; align-items: baseline; gap: 10px; }
.cv-tag { flex: none; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.3; background: rgba(255, 255, 255, .1); color: var(--navy-text); }
.cv-now .cv-tag { background: var(--accent-tint); color: var(--accent); }
.cv-was s { color: var(--navy-text); text-decoration-thickness: 1px; }
.cv-now b { font-weight: 600; }
.li-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 26px; }
.li-note { font-size: 14px; color: var(--navy-text); }
.who-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.who-more .note { background: #fff; }

/* ---------- как проходит: карточка спринта ---------- */
#how .how-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.step h3 { transition: color .2s var(--ease); }
.step.is-active h3 { color: var(--accent); }
@media (hover: hover) and (min-width: 900px) {
  .steps.is-linked .step { cursor: pointer; }
  .steps.is-linked .step:hover h3 { color: var(--accent); }
}
.how-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: clamp(32px, 4vw, 48px); }

.tk {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 19, 24, .04), 0 24px 48px -28px rgba(16, 19, 24, .22);
  overflow: hidden;
}
.tk .doc-foot { padding: 12px 24px 14px; }
.tk-body { padding: 20px 24px 22px; }
.tk-route { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.tk-route > b { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; }
.tk-route > span { font-size: 13.5px; color: var(--muted); }
.tk-steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.tk-steps button {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 4px 0 8px; border: 0; background: transparent; font: inherit; cursor: pointer; color: var(--muted);
  transition: color .2s var(--ease);
}
.tk-steps button::before {
  content: ""; display: block; width: 100%; height: 6px; margin-top: 4px;
  border-radius: 3px; background: var(--line);
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.tk-n { font-size: 12px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  .tk-steps button:hover { color: var(--ink); }
  .tk-steps button:hover::before { background: var(--line-strong); }
  .tk-steps button.is-done:hover::before, .tk-steps button.is-now:hover::before { background: var(--accent-hover); }
}
.tk-steps button.is-done::before { background: var(--accent); }
.tk-steps button.is-now::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.tk-steps button[aria-selected="true"] { color: var(--accent); }
.tk-steps button[aria-selected="true"] .tk-n { font-weight: 700; }
.tk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.tk-stage { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin: 0; }
.tk-stage > span { font-size: 13px; color: var(--muted); }
.tk-stage > b { font-size: 17px; letter-spacing: -0.01em; }
.tk-pager { display: flex; flex: none; gap: 6px; }
.tk-pager .icon-btn {
  width: 36px; height: 36px; border-radius: 999px; border-color: var(--line); background: #fff; color: var(--ink);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), opacity .2s var(--ease);
}
.tk-pager .icon-btn:hover { border-color: var(--line-strong); background: var(--bg); }
.tk-pager .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tk-pager .icon-btn[aria-disabled="true"] { opacity: .35; cursor: default; }
.tk-pager .icon-btn[aria-disabled="true"]:hover { border-color: var(--line); background: #fff; }
.tk-panel { transition: opacity .16s; }
.tk-panel h4 { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tk-tasks { list-style: none; margin: 0; padding: 0; }
.tk-tasks li { position: relative; padding: 5px 0 5px 28px; font-size: 15px; line-height: 1.4; color: var(--ink); }
.tk-tasks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border: 1.5px solid var(--line-strong); border-radius: 5px; background: #fff; }
.tk-tasks li.is-done { color: var(--muted); }
.tk-tasks li.is-done::before { border-color: var(--accent); background: var(--accent); }
.tk-tasks li.is-done::after { content: ""; position: absolute; left: 5px; top: 9px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tk-funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.tk-funnel div { display: flex; flex-direction: column-reverse; padding: 0 10px; border-left: 1px solid var(--line); }
.tk-funnel div:first-child { padding-left: 0; border-left: 0; }
.tk-funnel dt { font-size: 12px; color: var(--muted); }
.tk-funnel dd { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tk-result { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-tint); }
.tk-result > span { display: block; font-size: 12.5px; color: var(--muted); }
.tk-result > b { display: block; margin-top: 2px; font-size: 15px; color: var(--ink); }

/* ---------- стоимость: калькулятор окупаемости под карточкой ведения ---------- */
.price-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 24px; }
.calc { padding: 28px 32px 30px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.calc h3 { font-size: 20px; }
.calc-sub { margin-top: 8px; max-width: 56ch; font-size: 15px; color: var(--body); }
.calc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.calc label { display: grid; gap: 8px; }
.calc label > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.calc input {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 52px; padding: 0 44px 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg);
  font: inherit; font-size: 20px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
}
.calc input:hover { border-color: var(--muted); }
.calc-box { position: relative; display: block; }
.calc-pen { position: absolute; top: 50%; right: 14px; margin-top: -9px; color: var(--muted); pointer-events: none; transition: opacity .15s var(--ease), color .15s var(--ease); }
.calc-box:hover .calc-pen { color: var(--ink); }
.calc input:focus + .calc-pen { opacity: 0; }
.calc input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); background: #fff; }
.calc-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.calc-out div { padding: 0 16px; border-left: 1px solid var(--line); }
.calc-out div:first-child { padding-left: 0; border-left: 0; }
.calc-out dt { font-size: 13px; color: var(--muted); }
.calc-out dd { margin: 4px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.calc-out div:nth-child(2) dd { color: var(--accent); }
.calc-note { margin-top: 18px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.calc-note.is-warn { color: var(--err); }

/* ---------- когда выходить на рынок: сетка активности найма ----------
   Разметка статичная (в index.html), те же два окна и две паузы, что в тексте раздела.
   Шрифт шапки и подписи — JetBrains Mono, подмножество с кириллицей (OFL, fonts/jbmono-OFL.txt). */
@font-face { font-family: "JB Mono"; src: url(fonts/jbmono-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JB Mono"; src: url(fonts/jbmono-500.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
.season { --cell-0: #e5e7ed; --cell-1: #c9d3f5; --cell-2: #93a7ee; --cell-3: #4d69d9; --cell-4: #0a2fb8; }
.season .months { gap: 6px; }
.season .months span { padding: 0 0 10px; border-top: 0; font: 400 12px/1 "JB Mono", monospace; text-align: left; color: var(--muted); }
.season .months .is-on { color: var(--ink); font-weight: 500; }
.contrib { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.contrib .cm { display: grid; gap: 3px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(7, auto); grid-auto-flow: column; }
.contrib i, .contrib-legend i { display: block; border-radius: 3px; background: var(--cell-0); }
.contrib i { aspect-ratio: 1 / 1; }
.contrib .l1, .contrib-legend .l1 { background: var(--cell-1); }
.contrib .l2, .contrib-legend .l2 { background: var(--cell-2); }
.contrib .l3, .contrib-legend .l3 { background: var(--cell-3); }
.contrib .l4, .contrib-legend .l4 { background: var(--cell-4); }
.contrib-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  margin-top: 12px; font: 400 12px/1.3 "JB Mono", monospace; color: var(--muted);
}
.contrib-legend { display: inline-flex; align-items: center; gap: 4px; }
.contrib-legend span + i, .contrib-legend i + span { margin-left: 4px; }
.contrib-legend i { width: 11px; height: 11px; }

/* ---------- адаптив ---------- */
@media (max-width: 1024px) {
  .li-grid { grid-template-columns: 1fr 1fr; }
  .li-cv { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
  #how .how-grid, .price-row { grid-template-columns: 1fr; }
  .how-side .tk { max-width: 520px; }
  .who-more, .how-notes { grid-template-columns: 1fr; }
  /* сетка сезонов на телефоне: по две недели на месяц */
  .season .months { gap: 4px; }
  .season .months span { font-size: 10.5px; padding-bottom: 8px; }
  .contrib { gap: 4px; }
  .contrib .cm { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
  .contrib .cm i:nth-child(n+8):nth-child(-n+14), .contrib .cm i:nth-child(n+22) { display: none; }
  .contrib i { border-radius: 2px; }
}
@media (max-width: 600px) {
  /* «на IT Product Manager.» не переносится: на узких экранах уменьшаем заголовок, чтобы строка влезала */
  .hero-copy h1 { font-size: min(36px, calc((100vw - 2 * var(--gutter)) / 11)); }
  .board { margin-inline: -6px; padding: 22px 14px 0; }
  .track { --n: 24px; --label: 108px; }
  .lane { --lane-h: 46px; }
  .lane-n { margin-left: 2px; }
  .lane-name { font-size: 14.5px; }
  .cp1, .cp2, .cp3, .cp4 { display: none; }
  .li-grid { grid-template-columns: 1fr; gap: 20px; }
  .li-title { font-size: 20px; }
  .li-foot .btn { width: 100%; }
  .tk-body, .tk .doc-foot { padding-left: 18px; padding-right: 18px; }
  .tk-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .tk-funnel div:nth-child(3) { padding-left: 0; border-left: 0; }
  .calc { padding: 24px 20px; }
  .calc-fields { grid-template-columns: 1fr; }
  .calc-out { grid-template-columns: 1fr; row-gap: 14px; }
  .calc-out div { padding: 0; border-left: 0; }
}

/* ---------- скриншоты: значок увеличения ---------- */
.shot button { position: relative; }
.shot button::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .94) url(img/icon-expand.svg) center / 16px no-repeat;
  box-shadow: 0 1px 2px rgba(16, 19, 24, .06);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
@media (hover: hover) {
  .shot button:hover::after { border-color: var(--line-strong); background-color: #fff; }
}
