/* muettertreff.org - стили. Токены из SITE_SPEC.md, раздел 6. */

@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/inter-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/inter-500-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/inter-700-latin.woff2") format("woff2");
}

:root {
  --bg: #FBF3B8;
  --ink: #222222;
  --accent: #8D3B37;
  --dark: #1A1A1A;
  --border: rgba(34, 34, 34, .18);
  --border-solid: #222222;
  --card-bg: #FFFFFF;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
h1, h2, h3 { font-family: "Inter", Arial, sans-serif; font-weight: 700; line-height: 1.25; color: var(--accent); }
h1 { font-size: 34px; margin: 0 0 12px; }
h2 { font-size: 26px; margin: 34px 0 14px; }
h3 { font-size: 20px; margin: 20px 0 8px; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.mt-main { max-width: 1140px; margin: 0 auto; padding: 0 20px; display: block; }
.mt-wrap { }

/* ---- шапка: горизонтальное меню (спек раздел 6 "Шапка") ---- */
.mt-nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
.mt-nav a {
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: 16px;
  padding: 4px 2px; border-bottom: 2px solid transparent;
}
.mt-nav a[aria-current="page"], .mt-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.mt-burger {
  display: none; background: none; border: 0; width: 34px; height: 28px;
  flex-direction: column; justify-content: space-between; cursor: pointer; padding: 0;
}
.mt-burger span { display: block; height: 3px; background: var(--ink); border-radius: 2px; }

@media (max-width: 760px) {
  .mt-burger { display: flex; }
  .mt-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg);
            border-bottom: 1px solid var(--border); display: none; }
  .mt-nav.mt-open { display: block; }
  .mt-nav ul { flex-direction: column; gap: 0; padding: 8px 20px 16px; }
  .mt-nav a { display: block; padding: 10px 0; }
}

.mt-skip {
  position: absolute; left: -9999px; top: 0; background: var(--dark); color: #fff;
  padding: 10px 16px; z-index: 100;
}
.mt-skip:focus { left: 12px; top: 12px; }

/* ---- шапка ---- */
.mt-head { background: var(--bg); border-bottom: 1px solid var(--border-solid); }
.mt-head-in {
  max-width: 1140px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 76px; position: relative;
}
.mt-logo { font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }

/* ---- крошки ---- */
.mt-crumbs { padding: 14px 0 0; }
.mt-crumbs a, .mt-crumbs-mid, .mt-crumbs-current { font-size: 14px; }
.mt-crumbs a { color: var(--accent); text-decoration: none; }
.mt-crumbs a:hover { text-decoration: underline; }
.mt-crumbs-mid, .mt-crumbs-current { color: var(--ink); }
.mt-crumbs-sep { margin: 0 6px; color: var(--accent); }

/* ---- hero: H1 liegt auf dem Foto (Spec 6, "Шапка": "poverh ili pod") ---- */
.mt-hero { position: relative; margin: 20px 0 0; border-radius: 10px; overflow: hidden; }
.mt-hero-img { width: 100%; height: auto; aspect-ratio: 16 / 6; object-fit: cover; }
.mt-hero-text {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 24px;
  background: linear-gradient(to top, rgba(26,26,26,.78), rgba(26,26,26,0) 85%);
}
.mt-hero-h1 { margin: 0 0 8px; color: #fff; }
.mt-hero-sub { font-size: 18px; color: #fff; max-width: 720px; }

@media (max-width: 600px) {
  .mt-hero-img { aspect-ratio: 4 / 3; }
}

/* ---- карточки ---- */
.mt-cards-wrap { margin: 36px 0; }
.mt-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
/* Балансировка неполного ряда (1-2 карточки вместо трёх) - без "сироты". */
.mt-cards-2 { grid-template-columns: repeat(2, 1fr); }
.mt-cards-1 { grid-template-columns: minmax(0, 340px); justify-content: center; }
.mt-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; transition: box-shadow .15s;
}
.mt-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.mt-card-img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px 6px 0 0; }
.mt-card-body { padding: 16px; }
.mt-card-title { font-size: 19px; margin: 0 0 8px; }
.mt-card-title a { color: var(--ink); text-decoration: none; }
.mt-card:hover .mt-card-title a { text-decoration: underline; }
.mt-card-text { font-size: 15px; margin: 0 0 10px; }
.mt-card-more { font-size: 14px; font-weight: 500; text-decoration: none; }

@media (max-width: 760px) {
  .mt-cards { grid-template-columns: 1fr; }
}

/* ---- статья / внутренняя страница ---- */
.mt-article-grid { display: grid; grid-template-columns: 1fr 280px; gap: 32px; margin: 28px 0; align-items: start; }
.mt-h1 { font-size: 30px; }
.mt-meta { color: var(--accent); font-size: 14px; margin: 0 0 18px; }
.mt-art-img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; margin: 0 0 20px; }
.mt-prose, article p, article ul { max-width: 760px; margin-left: auto; margin-right: auto; }
.mt-prose-service { max-width: 760px; margin-left: auto; margin-right: auto; }
article p { margin-top: 0; margin-bottom: 16px; }
article ul { margin-top: 0; margin-bottom: 16px; padding-left: 22px; }
article li { margin: 0 0 6px; }

.mt-aside { position: sticky; top: 20px; }
.mt-aside-box {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; margin-bottom: 16px;
}
.mt-aside-title { font-size: 15px; margin: 0 0 10px; color: var(--accent); }
.mt-aside-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.mt-aside-list li { margin: 0 0 8px; }
.mt-aside-list a { color: var(--ink); text-decoration: none; }
.mt-aside-list a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .mt-article-grid { grid-template-columns: 1fr; }
  .mt-aside { position: static; }
}

/* ---- faq ---- */
.mt-faq { margin: 32px 0; }
.mt-faq-item { padding: 14px 0; border-top: 1px solid var(--border); }
.mt-faq-q { margin: 0 0 6px; font-size: 17px; }

/* ---- подписка / cta ---- */
.mt-subscribe, .mt-mirror-note {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 20px; margin: 28px 0;
}
.mt-btn {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  padding: 10px 20px; border-radius: 6px; font-weight: 500;
}
.mt-btn:hover { opacity: .9; }
.mt-mirror-note p { margin: 0 0 8px; font-size: 14px; }
.mt-mirror-note ul { margin: 0; padding-left: 20px; font-size: 14px; }

/* ---- форма ---- */
.mt-form label { font-weight: 500; font-size: 14px; }
.mt-form input, .mt-form textarea {
  width: 100%; max-width: 420px; padding: 9px 11px; border: 1px solid var(--border);
  border-radius: 6px; font: inherit; margin-top: 4px;
}

/* ---- подвал ---- */
.mt-foot { background: var(--accent); color: var(--bg); margin-top: 48px; }
.mt-foot-in {
  max-width: 1140px; margin: 0 auto; padding: 40px 20px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
}
.mt-foot-logo { font-weight: 700; font-size: 18px; margin: 0 0 10px; }
.mt-foot-about { font-size: 14px; opacity: .92; }
.mt-foot-title { font-size: 14px; margin: 0 0 10px; }
.mt-foot-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.mt-foot-list li { margin: 0 0 8px; }
.mt-foot a { color: var(--bg); }
.mt-foot-bottom {
  border-top: 1px solid rgba(251,243,184,.3); padding: 16px 20px; font-size: 13px;
  display: flex; justify-content: space-between; max-width: 1140px; margin: 0 auto; gap: 12px; flex-wrap: wrap;
}

@media (max-width: 760px) {
  .mt-foot-in { grid-template-columns: 1fr; }
}

/* ---- ошибки ---- */
.mt-error { text-align: center; padding: 70px 0; }
.mt-error-code { color: var(--accent); font-weight: 700; font-size: 20px; margin: 0; }
.mt-error-h1 { font-size: 32px; color: var(--accent); }
.mt-error-line { max-width: 480px; margin: 0 auto 20px; }
.mt-error-links { list-style: none; padding: 0; margin: 24px 0 0; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- таблицы (на случай использования) ---- */
@media (max-width: 640px) {
  table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
