/* Лендинги PDF /materials/<short>/ и блок на /materials/#pdf-magnets.
   Токены сайта (--bg, --text, --line, --accent). Без своих шрифтов. */

.material-landing-page {
  background: var(--bg);
  color: var(--text);
}

.ml {
  padding-bottom: 48px;
}

.ml-top {
  display: grid;
  gap: 28px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.ml-kind {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent-ink);
}

.material-landing-page h1 {
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 4.2vw, 2.05rem);
  line-height: 1.25;
  color: var(--text);
  max-width: 28em;
}

.ml-download {
  width: 100%;
}

.ml-inside {
  margin: 22px 0 8px;
  font-size: 1.15rem;
  color: var(--text);
}

.ml-lead {
  margin: 0;
  max-width: 62ch;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.55;
}

.ml-reel,
.ml-soon {
  margin: 14px 0 0;
  font-size: 15px;
}

.ml-soon {
  color: var(--muted);
}

.ml-reel a {
  color: var(--accent-ink);
}

.ml-note {
  margin: 16px 0 0;
  max-width: 68ch;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.ml-shots {
  display: grid;
  gap: 16px;
}

.ml-shot {
  margin: 0;
}

.ml-shot img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.ml-shot figcaption {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.ml-shot__link {
  display: inline-block;
  margin-top: 10px;
}

.ml-review {
  margin-top: 8px;
}

.ml-review__box {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 16px 18px;
}

.ml-review h2 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  line-height: 1.3;
  color: var(--text);
}

.ml-review .sub {
  margin: 0;
  color: var(--text-secondary);
  max-width: 62ch;
}

.ml-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 18px;
}

.ml-actions .btn {
  text-align: center;
}

.ml-gets {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
}

.ml-gets li {
  position: relative;
  margin: 0 0 8px;
  padding-left: 22px;
}

.ml-gets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.ml form {
  display: grid;
  gap: 12px;
}

.ml .field label,
.ml .flabel {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}

.ml .opt {
  font-weight: 450;
  color: var(--muted);
}

.ml input[type="text"],
.ml input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ml-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.ml-file small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.ml-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.ml-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ml-seg label {
  position: relative;
  margin: 0;
  font-weight: 500;
}

.ml-seg input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.ml-seg span {
  display: block;
  text-align: center;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

.ml-seg input:checked + span {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.ml-seg input:focus-visible + span,
.ml input:focus-visible,
.ml .ml-file:focus-within,
.ml a:focus-visible,
.ml button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ml .err {
  display: none;
  margin: 6px 0 0;
  color: var(--loss);
  font-size: 13px;
}

.ml .field.invalid .err,
.ml .err.is-on {
  display: block;
}

.ml .check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text);
}

.ml .check a {
  color: var(--accent-ink);
}

.ml .policy {
  margin: 0;
  font-size: 13px;
}

.ml .policy a {
  color: var(--accent-ink);
}

.ml .fnote,
.ml .attached {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.ml .success {
  display: none;
}

.ml .success h3 {
  margin: 8px 0;
  color: var(--text);
}

.ml .success p {
  color: var(--text-secondary);
}

.ml .leadbox.sent > form,
.ml .leadbox.sent > .ml-gets,
.ml .leadbox.sent > .sub,
.ml .leadbox.sent > .ml-actions {
  display: none;
}

.ml .leadbox.sent .success {
  display: block;
}

.ml-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ml-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ml-more h2 {
  margin-top: 0;
}

.ml-more ul {
  margin: 0;
  padding-left: 1.1em;
  color: var(--text-secondary);
}

.ml-more a {
  color: var(--accent-ink);
}

.pdf-magnet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.pdf-magnet-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pdf-magnet-card__media {
  display: block;
  background: var(--bg-2);
  line-height: 0;
}

.pdf-magnet-card__media img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  object-position: top center;
}

.pdf-magnet-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 16px;
  flex: 1;
}

.pdf-magnet-card__kind {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent-ink);
}

.pdf-magnet-card__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.pdf-magnet-card__title a {
  color: var(--text);
  text-decoration: none;
}

.pdf-magnet-card__title a:hover {
  color: var(--accent-ink);
}

.pdf-magnet-card__line {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pdf-magnet-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: auto;
  padding-top: 4px;
  font-size: 14px;
}

.pdf-magnet-card__links a {
  color: var(--accent-ink);
}

/* style.css красит любой span внутри .project-section. На форме это
   выглядит как ошибка у обычных подписей. */
html:not([data-theme="dark"]) .material-landing-page .ml-review span {
  color: var(--text);
}

html:not([data-theme="dark"]) .material-landing-page .ml-review .opt {
  color: var(--muted);
}

html:not([data-theme="dark"]) .material-landing-page .ml-review .err {
  color: var(--loss);
}

html:not([data-theme="dark"]) .material-landing-page .ml-review .check a,
html:not([data-theme="dark"]) .material-landing-page .ml-review .policy a {
  color: var(--accent-ink);
}

html:not([data-theme="dark"]) .pdf-magnets .pdf-magnet-card__kind {
  color: var(--accent-ink);
}

.pdf-magnets > .container > p {
  max-width: 68ch;
  color: var(--text-secondary);
}

@media (min-width: 720px) {
  .ml-download {
    width: auto;
    min-width: 220px;
  }

  .ml-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .ml-review__box {
    padding: 28px;
  }

  .pdf-magnet-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .ml-top {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
    align-items: start;
    gap: 36px;
  }

}

@media (min-width: 1100px) {
  .pdf-magnet-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pdf-magnet-card,
  .ml-shot img {
    transition: none;
  }
}
