:root{
  --bg:#0b0d10;
  --card:#11151b;
  --card2:#0f1318;
  --text:#e8eef6;
  --muted:#a9b4c2;
  --line:#1c2430;
  --btn:#1f6feb;
  --btn2:#2a3340;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --r:16px;
}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{color:inherit}
.container{max-width:1100px;margin:0 auto;padding:0 16px}

.header{position:sticky;top:0;z-index:50;background:rgba(11,13,16,.85);backdrop-filter: blur(10px);border-bottom:1px solid var(--line)}
.header__inner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0}
.brand{font-weight:700;letter-spacing:.2px}
.header__cta{display:flex;gap:10px;flex-wrap:wrap}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 12px;border-radius:12px;border:1px solid var(--line);text-decoration:none;cursor:pointer}
.btn--primary{background:var(--btn);border-color:transparent}
.btn--ghost{background:transparent}
.btn--muted{background:var(--btn2)}
.btn--primary{
  color:#ffffff;
}

.btn--muted{
  color:#e8eef6;
}

.btn--ghost{
  color:#e8eef6;
}

.hero{padding:22px 0 10px}
.hero__title{font-size:28px;font-weight:800;line-height:1.15}
.hero__subtitle{margin-top:8px;color:var(--muted);max-width:720px}
.hero__stats{margin-top:14px;display:flex;gap:10px;flex-wrap:wrap}
.pill{border:1px solid var(--line);background:var(--card2);padding:8px 10px;border-radius:999px;color:var(--muted)}
.hero__formats{margin-top:12px;color:var(--muted)}
.hero__ctas{margin-top:14px;display:flex;gap:10px;flex-wrap:wrap}

.section{padding:18px 0 28px}
.section__title{font-size:20px;font-weight:800}
.section__hint{margin-top:6px;color:var(--muted)}

.grid{margin-top:14px;display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
@media (max-width: 960px){.grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width: 640px){.grid{grid-template-columns:1fr}}

.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);overflow:hidden}
.card__head{padding:14px 14px 10px}
.card__name{font-weight:800}
.card__meta{margin-top:4px;color:var(--muted);font-size:14px;display:flex;gap:8px;flex-wrap:wrap}
.card__summary{margin-top:10px;color:var(--text);opacity:.92}

.photos{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:0 14px 12px}
.photo{width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:12px;border:1px solid var(--line);background:#0a0c0f}

.card__actions{padding:0 14px 14px;display:flex;gap:10px;flex-wrap:wrap}
.toggle{width:100%;}

.expand{border-top:1px solid var(--line);background:rgba(255,255,255,.02);padding:14px;display:none}
.card.open .expand{display:block}

.ach{border:1px solid var(--line);border-radius:14px;background:rgba(0,0,0,.15);padding:12px;margin-top:10px}
.ach:first-child{margin-top:0}
.ach__title{font-weight:800}
.ach__facts{margin-top:6px;color:var(--muted);font-size:13px;display:flex;gap:8px;flex-wrap:wrap}

.ach__kv{margin-top:10px;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.kv{border:1px solid var(--line);border-radius:12px;padding:10px;background:rgba(0,0,0,.18)}
.kv__k{color:var(--muted);font-size:12px}
.kv__v{margin-top:4px;font-weight:700}

.ach__story{margin-top:10px;color:var(--text);opacity:.92;white-space:pre-wrap}
.gallery{margin-top:10px;display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
@media (max-width: 640px){.gallery{grid-template-columns:repeat(2,1fr)}}
.gimg{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:12px;border:1px solid var(--line);background:#0a0c0f}

.proofs{margin-top:10px;display:flex;gap:10px;flex-wrap:wrap}

.muted{color:var(--muted)}
.footer{border-top:1px solid var(--line);padding:18px 0;margin-top:22px}
.hero__img{
  width: 120px;
  height: 120px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
/* Coach photo */
.hero__photo{margin:0 0 14px}
.hero__img{
  width:140px;
  height:140px;
  border-radius:18px;
  object-fit:cover;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

/* Button states — hover / active / focus */
.btn:hover{
  filter: brightness(1.07);
}

.btn:active{
  transform: translateY(1px);
}

.btn:focus-visible{
  outline: 2px solid rgba(31,111,235,.6);
  outline-offset: 2px;
}

/* Кейсы: сетка 2 в ряд */
#cases #athletesGrid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 32px !important;
}
@media (max-width: 768px){
  #cases #athletesGrid {
    grid-template-columns: 1fr !important;
  }
}

/* Кейсы: фото в карточках — ч/б на фасаде */
#athletesGrid .card img{
  filter: grayscale(100%) contrast(1.08);
  transition: filter .2s ease, transform .2s ease;
}

/* лёгкий hover, чтобы “оживить” */
#athletesGrid .card:hover img{
  filter: grayscale(100%) contrast(1.12);
  transform: scale(1.02);
}

/* Ч/б фото в карточках кейсов */
#athletesGrid article.card img.photo {
  filter: grayscale(100%) !important;
  transition: filter .3s ease, transform .3s ease;
}

/* Лёгкий hover */
#athletesGrid article.card:hover img.photo {
  transform: scale(1.02);
}

/* Кейсы: делаем все фото в сетке ч/б */
#athletesGrid img {
  filter: grayscale(100%) !important;
}

/* ===== Photo Modal ===== */

.photo-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.photo-modal.active {
  display: flex;
}

.photo-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.photo-modal__img {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border-radius: 8px;
}

/* Coach KPI (МС/МСМК) */
.coach-kpi{
  margin: 16px 0 18px;
}
.coach-kpi__title{
  font-size: 14px;
  opacity: .8;
  margin-bottom: 10px;
}
.coach-kpi__row{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}
.coach-kpi__item{
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  min-width: 140px;
}
.coach-kpi__num{
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
}
.coach-kpi__lbl{
  margin-top: 6px;
  font-size: 13px;
  opacity: .85;
}

/* Кейсы: скрытые карточки */
#athletesGrid .card.is-hidden{
  display:none;
}

/* Кнопка "ещё кейсы" — по центру */
#moreCasesBtn{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:max-content !important;
  margin:18px auto 0 !important;
  height:3.5em !important;
  line-height:1 !important;
  padding:0 2.25em !important;
  vertical-align:middle;
}

/* Ровное выравнивание текста в action-кнопках карточек */
.card .btn.toggle,
#moreCasesBtn{
  min-height:3.5em;
  text-align:center;
}

.card .btn.toggle{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  height:3.5em !important;
  line-height:1 !important;
  padding:0 2.25em !important;
  vertical-align:middle;
}

/* Заглушка для пустых фото */
.photo--placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:12px;
  color:#a9b4c2;
  font-size:14px;
  line-height:1.4;
  background:linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px dashed rgba(169,180,194,.35);
}

.photo--placeholder span{
  opacity:.9;
}
