/* ============================================================
   СТ «Лебедь» — общие стили сайта
   Палитра: белый фон, чёрный текст, серые второстепенные.
   Спецификация: SPEC.md v0.2, раздел 7.
   ============================================================ */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-soft: #555555;
  --line: #e4e4e4;
  --muted: #f6f6f6;
  --radius: 10px;
  --header-h: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--ink);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius);
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.main-nav {
  display: flex;
  gap: 26px;
}

.main-nav a {
  text-decoration: none;
  font-size: 17px;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover {
  color: var(--ink);
}

.main-nav a.active {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--ink);
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: #000;
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--muted);
}

/* ---------- Приветственный блок ---------- */

.hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: 16em;
}

.hero .lead {
  margin: 0 0 32px;
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 30em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Секции ---------- */

.section {
  padding: 56px 0;
}

.section-muted {
  background: var(--muted);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.2;
}

.section-more {
  font-size: 17px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.section-more:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- Новости ---------- */

.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: var(--bg);
}

.news-card.important {
  border: 2px solid var(--ink);
  padding: 21px 23px;
}

.news-badge {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
}

.news-date {
  font-size: 15px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.news-card p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-soft);
  flex-grow: 1;
}

/* ---------- Карточки-ссылки «Важно знать» ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card-link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  background: var(--bg);
  transition: border-color 0.15s, background-color 0.15s;
}

.card-link:hover {
  border-color: var(--ink);
  background: var(--bg);
}

.card-title {
  font-size: 19px;
  font-weight: 600;
}

.card-desc {
  font-size: 16px;
  color: var(--ink-soft);
}

.card-arrow {
  margin-top: auto;
  font-size: 16px;
  color: var(--ink-soft);
}

.card-link:hover .card-arrow {
  color: var(--ink);
}

/* ---------- Быстрые контакты ---------- */

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.contact-role {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}

.contact-name {
  margin: 6px 0 12px;
  font-size: 22px;
  font-weight: 700;
}

.contact-phone {
  font-size: 26px;
  font-weight: 700;
  text-decoration: none;
}

.contact-phone:hover {
  text-decoration: underline;
}

.contact-note {
  margin-top: 8px;
  font-size: 16px;
  color: var(--ink-soft);
}

/* ---------- События ---------- */

.event-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.event-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 18px 24px;
  background: var(--bg);
}

.event-row + .event-row {
  border-top: 1px solid var(--line);
}

.event-date {
  font-weight: 700;
  white-space: nowrap;
}

.event-place {
  font-size: 16px;
  color: var(--ink-soft);
}

/* ---------- Внутренние страницы ---------- */

.page-header-block {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.page-lead {
  margin: 0;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 40em;
}

.placeholder-note {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px;
  font-size: 18px;
  color: var(--ink-soft);
}

/* ---------- Таблица сведений («О товариществе») ---------- */

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table th,
.info-table td {
  text-align: left;
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.info-table th {
  font-weight: 400;
  color: var(--ink-soft);
  white-space: nowrap;
  padding-right: 40px;
}

.info-table td {
  font-weight: 600;
}

/* ---------- Правление ---------- */

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ---------- Реквизиты оплаты ---------- */

.requisites {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px 32px;
}

.requisites h3 {
  margin: 0 0 18px;
  font-size: 22px;
}

.requisites-list {
  margin: 0 0 22px;
  display: grid;
  gap: 10px;
}

.requisites-list div {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.requisites-list dt {
  color: var(--ink-soft);
  min-width: 200px;
}

.requisites-list dd {
  margin: 0;
  font-weight: 600;
}

/* ---------- Карта ---------- */

.map-embed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

/* ---------- Страница «Новости»: полная лента ---------- */

.news-year {
  margin-bottom: 24px;
}

.news-year-title {
  margin: 40px 0 20px;
  font-size: 26px;
}

.news-year:first-child .news-year-title {
  margin-top: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 6px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: var(--bg);
}

.news-item + .news-item {
  margin-top: 14px;
}

.news-item.important {
  border: 2px solid var(--ink);
  padding: 21px 23px;
}

.news-item-meta {
  display: grid;
  gap: 10px;
  align-content: start;
}

.news-item-body h3 {
  margin: 0 0 6px;
  font-size: 21px;
  line-height: 1.35;
}

.news-item-body p {
  margin: 0;
  color: var(--ink-soft);
}

/* ---------- Страница «Документы» ---------- */

.docs-category {
  margin-bottom: 44px;
}

.docs-category h2 {
  margin: 0 0 8px;
  font-size: 25px;
}

.doc-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px 24px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.doc-title {
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--line);
}

.doc-title:hover {
  border-bottom-color: var(--ink);
}

.doc-meta {
  font-size: 15px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.doc-format {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Страница «Контакты» ---------- */

.phone-list {
  border-top: 1px solid var(--line);
}

.phone-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 24px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.phone-role {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.phone-name {
  font-size: 18px;
  font-weight: 600;
}

.phone-value {
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.phone-value:hover {
  text-decoration: underline;
}

.phone-note {
  font-size: 15px;
  color: var(--ink-soft);
  grid-column: 2;
  text-align: right;
}

.contact-links {
  display: grid;
  gap: 10px;
}

.contact-links a {
  font-weight: 600;
}

/* ---------- Форма обращения ---------- */

.form {
  display: grid;
  gap: 18px;
  max-width: 680px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label {
  font-size: 17px;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: inherit;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  padding: 11px 14px;
  min-height: 48px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  width: 100%;
}

.form-field textarea {
  min-height: 150px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--ink);
  outline: none;
}

.form-field :required:focus {
  border-color: var(--ink);
}

.hp-field {
  position: absolute;
  left: -9999px;
}

.form-status {
  display: none;
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 17px;
}

.form-status.show {
  display: block;
}

.form-status--info {
  background: var(--muted);
  border: 2px solid var(--line);
}

.form-status--ok {
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--ink);
}

.form-status--err {
  background: var(--bg);
  border: 2px solid var(--ink);
  font-weight: 600;
}

@media (max-width: 768px) {
  .people-grid {
    grid-template-columns: 1fr;
  }

  .news-item {
    grid-template-columns: 1fr;
  }

  .map-embed iframe {
    height: 320px;
  }
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .doc-row {
    grid-template-columns: 1fr auto;
  }

  .doc-meta {
    grid-row: 2;
  }

  .phone-row {
    grid-template-columns: 1fr;
  }

  .phone-note {
    grid-column: 1;
    text-align: left;
  }

  .info-table th {
    padding-right: 16px;
  }

  .requisites-list div {
    flex-direction: column;
    gap: 2px;
  }

  .requisites-list dt {
    min-width: 0;
  }
}

/* ---------- Подвал ---------- */

.site-footer {
  margin-top: 64px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--ink-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}

/* ---------- Мобильное меню ---------- */

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0 12px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1000px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  /* Без логотипа меню-бургер прижимаем к правому краю шапки */
  .header-inner {
    justify-content: flex-end;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 14px 0;
    font-size: 19px;
    border-bottom: 1px solid var(--line);
  }

  .main-nav a:last-child {
    border-bottom: none;
  }

  .main-nav a.active {
    border-bottom-color: var(--line);
  }

  .burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding: 48px 0 44px;
  }

  .section {
    padding: 44px 0;
  }
}

@media (max-width: 640px) {
  .cards-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .event-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .event-place {
    white-space: normal;
  }

  .section-head {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* ---------- Уважение к настройкам пользователя ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
