/* css/magnet.css */

/* ─── HERO ─── */
.mgn-hero {
  padding: 40px 0;
  background: var(--surface);
}

.mgn-hero__card {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  min-height: 460px;
}

.mgn-hero__body {
  padding: 52px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.mgn-hero__img-wrap {
  position: relative;
}

.mgn-hero__img-wrap img {
  position: absolute;
  top: -32px;
  bottom: -32px;
  right: -28px;
  left: 0;
  width: calc(100% + 28px);
  height: calc(100% + 64px);
  object-fit: contain;
  object-position: center right;
  display: block;
}

.mgn-hero__title {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 14px;
}

.mgn-hero__sub {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.mgn-hero__list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mgn-hero__list li {
  font-size: 15px;
  color: var(--ink);
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}

.mgn-hero__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

.mgn-hero__btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── ТРИ ДОРОЖКИ ─── */
.mgn-tracks {
  padding: 0 0 40px;
}

.mgn-tracks__head {
  margin-bottom: 32px;
}

.mgn-tracks__title {
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 8px;
}

.mgn-tracks__sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

.mgn-tracks__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mgn-track-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  border: 2px solid transparent;
  transition: border-color .18s, box-shadow .18s;
}

.mgn-track-card:hover {
  border-color: var(--red);
  box-shadow: 0 4px 20px rgba(0,0,0,.09);
}

.mgn-track-card--accent {
  border-color: var(--red);
  background: linear-gradient(135deg, var(--white) 0%, rgba(255,0,0,.02) 100%);
}

.mgn-track-card__icon {
  width: 44px;
  height: 44px;
  background: var(--surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  margin-bottom: 12px;
}

.mgn-track-card__num {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.mgn-track-card__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 12px;
}

.mgn-track-card__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  background: var(--surface);
  border-radius: 6px;
  padding: 3px 10px;
  margin-bottom: 12px;
}

.mgn-track-card__list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mgn-track-card__list li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}

.mgn-track-card__list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
}

.mgn-track-card__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* ─── HiCo vs LoCo ─── */
.mgn-types {
  padding: 0 0 40px;
}

.mgn-types__head {
  margin-bottom: 32px;
}

.mgn-types__title {
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
}

.mgn-types__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.mgn-type-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  position: relative;
}

.mgn-type-card__header {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.mgn-type-card__icon {
  width: 44px;
  height: 44px;
  background: var(--surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  flex-shrink: 0;
}

.mgn-type-card__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 4px;
}

.mgn-type-card__sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.mgn-type-card__list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mgn-type-card__list li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}

.mgn-type-card__list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
}

.mgn-type-card__rec {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  background: var(--surface);
  border-radius: 6px;
  padding: 3px 10px;
}

.mgn-type-note {
  grid-column: 1 / -1;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  display: flex;
  gap: 12px;
}

.mgn-type-note__icon {
  width: 32px;
  height: 32px;
  background: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  flex-shrink: 0;
}

.mgn-type-note p {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
}

/* ─── СОВМЕСТИМОСТЬ ─── */
.mgn-compat {
  padding: 0 0 40px;
}

.mgn-compat__head {
  margin-bottom: 32px;
}

.mgn-compat__title {
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
}

.mgn-compat__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mgn-compat-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.mgn-compat-card__logo-img {
  width: 100%;
  height: 56px;
  object-fit: contain;
  margin-bottom: 20px;
  display: block;
}

.mgn-compat-card__icon {
  width: 56px;
  height: 56px;
  background: var(--surface);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  margin-bottom: 20px;
  flex-shrink: 0;
}

.mgn-compat-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 12px;
}

.mgn-compat-card__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.mgn-compat-card__desc code {
  background: var(--surface);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 13px;
  color: var(--ink);
}

/* ─── ФОРМАТЫ ЗАПИСИ ─── */
.mgn-formats {
  padding: 0 0 40px;
}

.mgn-formats__card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 48px 56px;
  position: relative;
  overflow: hidden;
  min-height: 380px;
}

.mgn-formats__body {
  max-width: 50%;
}

.mgn-formats__title {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 20px;
}

.mgn-formats__card > p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.mgn-formats__code {
  background: var(--surface);
  border-radius: 8px;
  padding: 12px 18px;
  font-family: monospace;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 16px;
  overflow-x: auto;
  line-height: 1.5;
}

.mgn-formats__note {
  background: rgba(255, 0, 0, 0.06);
  border-left: 3px solid var(--red);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

.mgn-formats__img {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 52%;
  height: auto;
  display: block;
}

/* ─── СРАВНЕНИЕ ─── */
.mgn-compare {
  padding: 0 0 40px;
}

.mgn-compare__card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 48px 56px;
}

.mgn-compare__title {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 32px;
}

.mgn-compare__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.mgn-compare-item {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 28px 24px;
}

.mgn-compare-item__head {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  align-items: flex-start;
}

.mgn-compare-item__icon {
  width: 36px;
  height: 36px;
  background: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  flex-shrink: 0;
}

.mgn-compare-item__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.mgn-compare-item__text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.mgn-compare__note {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ─── ОСОБЕННОСТИ МАКЕТА ─── */
.mgn-layout {
  padding: 0 0 40px;
}

.mgn-layout__card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 48px 56px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.mgn-layout__icon {
  width: 56px;
  height: 56px;
  background: var(--surface);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  flex-shrink: 0;
}

.mgn-layout__body {
  flex: 1;
}

.mgn-layout__title {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 18px;
}

.mgn-layout__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mgn-layout__list li {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  padding-left: 18px;
  position: relative;
}

.mgn-layout__list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
}

/* ─── АДАПТИВ ─── */
@media (max-width: 900px) {
  .mgn-hero__card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .mgn-hero__body {
    padding: 40px 24px 32px;
  }

  .mgn-hero__img-wrap {
    height: 280px;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    overflow: hidden;
  }

  .mgn-hero__img-wrap img {
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-position: center;
  }

  .mgn-tracks__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mgn-types__grid {
    grid-template-columns: 1fr;
  }

  .mgn-compat__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mgn-formats__card {
    padding: 36px 32px;
    min-height: 320px;
  }

  .mgn-formats__body {
    max-width: 55%;
  }

  .mgn-compare__card {
    padding: 36px 32px;
  }

  .mgn-compare__grid {
    grid-template-columns: 1fr;
  }

  .mgn-layout__card {
    padding: 36px 32px;
    gap: 24px;
  }
}

@media (max-width: 860px) {
  .mgn-formats__card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .mgn-hero__body {
    padding: 28px 24px;
  }

  .mgn-hero__img-wrap {
    height: 220px;
  }

  .mgn-hero__btns {
    flex-direction: column;
  }

  .mgn-hero__btns .btn {
    width: 100%;
    text-align: center;
  }

  .mgn-tracks__grid {
    grid-template-columns: 1fr;
  }

  .mgn-compat__grid {
    grid-template-columns: 1fr;
  }

  .mgn-formats__card {
    display: flex;
    flex-direction: column;
    padding: 28px 24px 0;
    min-height: 0;
  }

  .mgn-formats__body {
    max-width: 100%;
  }

  .mgn-formats__img {
    position: static;
    width: 72%;
    align-self: flex-end;
    margin-top: 16px;
  }

  .mgn-compare__card {
    padding: 28px 24px;
  }

  .mgn-compare__grid {
    grid-template-columns: 1fr;
  }

  .mgn-layout__card {
    padding: 28px 24px;
    flex-direction: column;
  }
}
