/* ==========================================================================
   Зимняя Дача — общий дизайн-слой (brand.css)
   Единая палитра, шапка, подвал, кнопки. Подключается последним,
   поэтому перекрывает страничные стили.
   Контраст проверен: акцент #B04A2F + белый текст = 4,6:1 (WCAG AA).
   ========================================================================== */

:root {
  --ink: #111111;
  --ink-2: #2A2A2A;
  --muted: #6B6B6B;
  --muted-2: #6B6B6B;
  --accent: #B04A2F;        /* акцент для текста: 5,2:1 на тёплом белом */
  --accent-ink: #B04A2F;    /* акцент для кнопок: белый на нём 4,6:1 */
  --line: #E6E4E0;
  --paper: #FAFAF8;
  --paper-2: #F4F3F0;
}

/* ---------- Типографика и база ---------- */
body { background: var(--paper); color: var(--ink); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,250,248,.94) !important;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.site-header .header-nav a { color: var(--ink-2) !important; }
.site-header .brand-name { color: var(--ink) !important; }
.site-header .brand-sub { color: var(--muted-2) !important; }
.site-footer a, .site-footer .footer-name { color: #CFCBC4; }
.site-footer .footer-name { color: #FAFAF8; }
.program-bar {
  display: block; text-align: center; text-decoration: none;
  font-size: .875rem; letter-spacing: .12em; text-transform: uppercase;
  color: #8A3A25; background: #FBEDE7; padding: .55rem 1rem;
  border-bottom: 1px solid #F2DFD6;
}
.header-bar {
  max-width: 1200px; margin: 0 auto; padding: .85rem 1.5rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
}
.brand { order: 1; display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px;
  background: var(--ink); color: #FAFAF8; display: grid; place-items: center;
  font-family: 'Space Grotesk', 'Manrope', sans-serif; font-weight: 700; font-size: 1.05rem;
}
.brand-name {
  display: block; font-family: 'Space Grotesk', 'Manrope', sans-serif; font-weight: 700;
  font-size: 1.02rem; line-height: 1.15; letter-spacing: -.02em; color: var(--ink);
}
.brand-sub {
  display: block; font-size: .875rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted-2); margin-top: .15rem;
}
.header-nav {
  order: 3; width: 100%; display: flex; gap: .25rem 1.1rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }
.header-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .1rem;
  color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 600;
  white-space: nowrap; border-bottom: 2px solid transparent;
}
.header-nav a:hover, .header-nav a:focus { color: var(--accent-ink); border-bottom-color: var(--accent-ink); }
.header-cta { order: 2; margin-left: auto; }

@media (min-width: 1000px) {
  .header-nav { order: 2; width: auto; overflow: visible; margin-left: auto; }
  .header-cta { order: 3; margin-left: 0; }
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .85rem 1.5rem; border-radius: 999px;
  font-family: inherit; font-weight: 700; font-size: .98rem; line-height: 1;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn-accent, .header-cta, a.btn-accent { background: #8F3B24 !important; color: #fff !important; } /* контраст 7,4:1 */   /* 4,6:1 */
.btn-accent:hover { background: #7E3018; transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: #FAFAF8; }
.btn-primary:hover { background: #000; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--ink); border-color: #D6D3CE; }
.btn-outline:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-lg { min-height: 56px; padding: 1.05rem 1.9rem; font-size: 1.05rem; }

/* Старые имена кнопок — подтягиваем к системе и убираем градиенты */
.btn-gold, .btn-forest, .btn-ghost, .gold-text, .gold-text-dark, .shimmer {
  background-image: none !important;
  -webkit-text-fill-color: currentColor !important;
}
.btn-gold { background: var(--accent-ink) !important; color: #fff !important; min-height: 48px; }
.btn-gold:hover { background: #8F3B24 !important; }
.btn-forest { background: var(--ink) !important; color: #FAFAF8 !important; min-height: 48px; }
.btn-ghost { color: var(--ink) !important; border: 1px solid #D6D3CE !important; min-height: 48px; }
.gold-text, .gold-text-dark, .shimmer { color: var(--accent-ink) !important; }

/* ---------- Подвал ---------- */
.site-footer { background: #0E0E0E; color: #CFCBC4; margin-top: 0; border-top: 1px solid #2A2A2A; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 3rem 1.5rem 2rem;
  display: grid; gap: 2rem; grid-template-columns: 1fr;
}
.footer-brand { display: flex; align-items: center; gap: .75rem; }
.footer-brand .brand-mark { background: #FAFAF8; color: #111111; }
.footer-name { font-family: 'Space Grotesk', 'Manrope', sans-serif; font-weight: 700; color: #FAFAF8; font-size: 1.05rem; }
.footer-sub { font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; color: #8E8E8E; margin-top: .15rem; }
.footer-nav, .footer-contacts { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.footer-nav a, .footer-contacts a, .footer-contacts span {
  display: inline-flex; align-items: center; min-height: 44px;
  color: #CFCBC4; text-decoration: none; font-size: .95rem;
}
.footer-nav a:hover, .footer-contacts a:hover { color: #fff; }
.footer-contacts span { color: #8E8E8E; }
.footer-legal {
  border-top: 1px solid #2A2A2A; padding-top: 1.25rem; font-size: .875rem; color: #8E8E8E;
}
.footer-badge { display: inline-flex; align-items: center; gap: .75rem; }
.footer-badge img { height: 56px; width: auto; display: block; }

@media (min-width: 900px) {
  .footer-inner { grid-template-columns: 1.2fr 1fr 1.2fr; align-items: start; }
  .footer-legal { grid-column: 1 / -1; }
}

/* ---------- Призыв в подвале (все страницы) ---------- */
.footer-cta {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center;
  gap: 1rem 1.5rem; padding-bottom: 2rem; border-bottom: 1px solid #2A2A2A;
}
.footer-cta__title {
  font-family: 'Space Grotesk', 'Manrope', sans-serif; font-weight: 700;
  color: #FAFAF8; font-size: 1.1rem; margin: 0 auto 0 0;
}
.footer-cta .btn { min-height: 48px; }

/* ---------- Доступность нажатий ---------- */
.site-header a, .site-footer a, nav a { touch-action: manipulation; }
.program-bar { display: flex; align-items: center; justify-content: center; min-height: 44px; }
a[href^="tel:"] { display: inline-flex; align-items: center; min-height: 44px; }
#cookie-banner button { min-height: 44px; }
.header-nav a, .footer-nav a, .footer-contacts a, .road-link { min-height: 44px; }

/* ---------- Контраст мелких подписей ---------- */
.brand-sub, .stat-label { color: #6B6B6B !important; }        /* на светлом: 4,9:1 */
.footer-sub, .footer-legal, .footer-contacts span { color: #A3A3A3 !important; }  /* на тёмном: 6,4:1 */

/* ====== Отзыв руководителя, 05.10.2026: читаемость и мобильная вёрстка ====== */
html { -webkit-text-size-adjust: 100%; }
body { font-size: 18px; line-height: 1.6; overflow-wrap: break-word; overflow-x: clip; }
h1, h2, h3, .display { overflow-wrap: break-word; }
p, li, a, span, td, th { overflow-wrap: break-word; }
img, video, iframe, svg, table { max-width: 100%; }
.container, .wrap, .max-w-7xl, .max-w-3xl { padding-left: clamp(.9rem, 4vw, 1.5rem);
  padding-right: clamp(.9rem, 4vw, 1.5rem); }
@media (max-width: 480px) {
  h1, .display { font-size: clamp(1.6rem, 7.6vw, 2.3rem) !important; line-height: 1.12; }
  h2 { font-size: clamp(1.35rem, 6.6vw, 1.95rem) !important; }
  h3 { font-size: clamp(1.15rem, 5.4vw, 1.5rem) !important; }
  section { padding-left: 1rem !important; padding-right: 1rem !important; }
}
.btn, .btn-lg, .btn-accent, .btn-primary, .btn-outline { min-height: 52px; font-size: 1.02rem; padding-top: .85rem; padding-bottom: .85rem; }
@media (min-width: 900px) { .btn { min-height: 50px; } }
a[href^="tel:"], .header-nav a, .footer-nav a, .footer-contacts a, .road-link { min-height: 48px; display: inline-flex; align-items: center; }
.nav-desktop a, .header-nav a { font-size: 1.02rem; }

/* Знак клуба: солнце со стрелкой */
.brand-sun { width: 44px; height: 44px; object-fit: contain; display: block;
  animation: sun-spin 26s linear infinite; }
.footer-brand .brand-sun { width: 38px; height: 38px; }
@keyframes sun-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .brand-sun { animation: none; } }

/* Две двери: сразу под шапкой */
.two-doors { display: grid; gap: .75rem; grid-template-columns: 1fr; max-width: 1200px;
  margin: 1rem auto 0; padding: 0 clamp(.9rem, 4vw, 1.5rem); }
@media (min-width: 860px) { .two-doors { grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; } }
.door { display: block; text-decoration: none; border: 2px solid var(--ink, #111); border-radius: 18px;
  padding: 1rem 1.15rem; background: #fff; color: var(--ink, #111); min-height: 76px; }
.door b { display: block; font-family: 'Space Grotesk', 'Manrope', sans-serif; font-size: 1.22rem;
  letter-spacing: -.02em; margin-bottom: .2rem; }
.door span { color: #4A4A4A; font-size: 1rem; }
.door:hover { background: #F4F3F0; }
.door-company { border-color: #B04A2F; }
.door-company b { color: #B04A2F; }
.door-company:hover { background: #FBEDE7; }

/* ====== Единый язык страниц (05.10.2026): легаси-классы → токены ====== */
.btn-forest, .btn-gold, .btn-forest:hover, .btn-gold:hover {
  background: #B04A2F !important; color: #fff !important; border-color: #B04A2F !important; }
.gold-text, .gold-text-dark {
  color: #B04A2F !important; background: none !important;
  -webkit-text-fill-color: currentColor !important; }
.shimmer {
  background: none !important; color: #B04A2F !important;
  -webkit-text-fill-color: currentColor !important; animation: none !important; }
.aurora-wrap { background: #141414 !important; }
.section-light { background: #FAFAF8 !important; }
.badge, .badge-dark {
  background: #FBEDE7 !important; color: #B04A2F !important;
  border: 1px solid #F2DFD6 !important; }
.btn-forest *, .btn-gold * { color: #fff !important; }
/* запас по переносам и читаемости на всех страницах */
h1, h2, h3 { overflow-wrap: break-word; }
img { height: auto; }

/* ====== Подвал: современная структура (05.10.2026) ====== */
.site-footer { background: #0E0E0E; color: #CFCBC4; padding: 0; margin-top: 0; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 3rem 1.5rem 2rem;
  display: grid; grid-template-columns: 1fr; gap: 2rem 2.5rem;
}
@media (min-width: 900px) {
  .footer-inner { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
  .footer-cta, .footer-legal { grid-column: 1 / -1; }
}
.footer-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem;
  padding-bottom: 2rem; border-bottom: 1px solid #262626; }
.footer-cta__title { font-size: 1.1rem; font-weight: 700; color: #FAFAF8; margin: 0 auto 0 0; }
.footer-col { display: flex; flex-direction: column; gap: .55rem; }
.footer-col__title {
  font-size: .875rem; letter-spacing: .14em; text-transform: uppercase;
  color: #8E8B86; margin: 0 0 .35rem; font-weight: 700; }
.footer-col a { color: #E4E1DC; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.footer-col a:hover { color: #FAFAF8; text-decoration: underline; }
.footer-brand-link { display: flex; gap: .9rem; align-items: center; text-decoration: none; }
.footer-name { display: block; font-weight: 700; color: #FAFAF8; font-size: 1.1rem; }
.footer-sub { display: block; color: #8E8B86; font-size: .92rem; }
.footer-badge { display: flex; gap: .7rem; align-items: center; margin-top: 1.25rem; }
.footer-badge img { height: 40px; width: auto; border-radius: 8px; }
.footer-badge span { color: #8E8B86; font-size: .875rem; line-height: 1.3; max-width: 18rem; }
.footer-phone { font-size: 1.15rem; font-weight: 800; color: #FAFAF8 !important; }
.footer-addr { color: #8E8B86; font-size: .9rem; line-height: 1.35; }
.footer-legal {
  grid-column: 1 / -1; border-top: 1px solid #262626; padding-top: 1.25rem;
  display: grid; gap: .4rem; color: #8E8B86; font-size: .875rem; line-height: 1.45; }
.footer-legal p { margin: 0; }

/* ====== Единая типографика контентных страниц (05.10.2026) ====== */
main { color: #1A1A1A; }
main h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.02em;
  margin: 0 0 1rem; }
main h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -.02em; margin: 0 0 1rem; }
main h3 { font-size: 1.15rem; margin: 0 0 .5rem; }
main p, main li { max-width: 68ch; line-height: 1.6; }
main p { margin: 0 0 1rem; }
main ul, main ol { margin: 0 0 1.25rem; }
main table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; }
main th, main td { border: 1px solid #E6E4E0; padding: .7rem .8rem; text-align: left;
  vertical-align: top; }
main th { background: #F4F3F0; font-weight: 700; }
main section { border-color: #E6E4E0; }

/* Общий финальный шаг на контентных страницах */
.next-step { background: #141414; color: #FAFAF8; padding: 3rem 0; margin-top: 2rem; }
.next-step__in { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.next-step__label { color: #D9603F; font-weight: 700; font-size: .875rem; letter-spacing: .16em;
  text-transform: uppercase; margin: 0 0 .6rem; }
.next-step h2 { color: #FAFAF8; margin: 0 0 1rem; }
.next-step p { color: #B9B6B0; margin: 0 0 1.5rem; }
.next-step a.btn-outline { color: #FAFAF8; border-color: #3A3A3A; }

/* ===== Доступность и читаемость (07.10.2026) ===== */
:focus-visible { outline: 3px solid #B04A2F; outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 999; background: #141414;
  color: #FAFAF8; padding: .8rem 1.3rem; border-radius: 0 0 12px 0; font-weight: 700; text-decoration: none; }
.skip-link:focus { left: 0; }
/* подписи на фото: плашка вместо белого текста поверх изображения */
.strip-grid figcaption { background: rgba(20,20,20,.84); color: #fff; padding: .4rem .8rem;
  border-radius: 999px; font-size: .875rem; text-shadow: none; letter-spacing: .1em; }
/* минимальный кегль смыслового текста 14 px вместо 11,5–12,5 */
[style*="font-size: .875rem"], [style*="font-size: .875rem"],
[style*="font-size: .875rem"], [style*="font-size: .875rem"],
[style*="font-size: .875rem"], [style*="font-size: .875rem"],
[style*="font-size: .875rem"],  [style*="font-size: .875rem"],
[style*="font-size: 14px"],   [style*="font-size: 14px"] { font-size: .875rem !important; }
.arena-badge, .next-step__label, .eyebrow { font-size: .875rem; }
/* чекбоксы: крупная цель для 50+ */
input[type="checkbox"] { width: 24px; min-width: 24px; height: 24px; flex: none; accent-color: #B04A2F; transform: none !important; }

/* Шапка: компактная навигация, чтобы телефон оставался в одну строку (07.10.2026) */
@media (min-width: 1024px) {
  .header-bar { flex-wrap: nowrap; }
  .header-nav { flex-wrap: nowrap; gap: .1rem; margin-left: auto; }
  .header-nav a { font-size: .95rem; padding: 0 .45rem; white-space: nowrap; }
  .header-cta { white-space: nowrap; }
}
@media (max-width: 1023px) {
  .header-nav a { font-size: .95rem; padding: 0 .5rem; }
}

/* Мобильное меню: переносим пункты в несколько строк — ничего не обрезается (07.10.2026) */
@media (max-width: 1023px) {
  .header-nav {
    flex-wrap: wrap;
    overflow: visible;
    justify-content: center;
    row-gap: .1rem;
    width: 100%;
    order: 3;
    margin-left: 0;
  }
  .header-nav a { font-size: .95rem; padding: 0 .55rem; }
  .header-bar { flex-wrap: wrap; }
  .header-cta { order: 2; }
  /* пузырь чата не перекрывает текст карточек */
  #ai-chat-btn { bottom: 96px; }
}

/* ===== Календарь поводов: ближайшие юбилеи организаций (07.10.2026) ===== */
.dates-section { padding: 3.5rem 0 1rem; background: var(--paper); }
.dates-head { max-width: 46rem; margin: 0 auto 1.75rem; text-align: center; }
.dates-label { display: inline-block; color: var(--accent-ink); font-weight: 700; font-size: .875rem;
  letter-spacing: .16em; text-transform: uppercase; margin-bottom: .6rem; }
.dates-head h2 { font-family: 'Space Grotesk', sans-serif; letter-spacing: -.03em;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem); line-height: 1.15; margin: 0 0 .6rem; color: var(--ink); }
.dates-head p { color: #4A4A4A; font-size: 1.05rem; margin: 0; }
.dates-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; max-width: 1120px; margin: 0 auto; }
@media (min-width: 760px) { .dates-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
@media (min-width: 760px) { .dates-grid { grid-template-columns: repeat(3, 1fr); } }
.date-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.35rem 1.4rem;
  display: flex; flex-direction: column; gap: .75rem; transition: transform .18s, box-shadow .18s, border-color .18s; }
.date-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(17,17,17,.09); border-color: #D6D3CE; }
.date-card__when { display: flex; align-items: baseline; gap: .5rem; }
.date-card__day { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 2.4rem;
  line-height: 1; color: var(--accent-ink); letter-spacing: -.03em; }
.date-card__month { font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.date-card__left { margin-left: auto; background: #F4F3F0; border-radius: 999px; padding: .22rem .6rem;
  font-size: .875rem; font-weight: 600; color: #4A4A4A; white-space: nowrap; }
.date-card__left--soon { background: #FBEDE7; color: #8F3B24; }
.date-card h3 { font-size: 1.12rem; line-height: 1.3; margin: 0; color: var(--ink); }
.date-card__meta { color: #4A4A4A; font-size: .95rem; margin: 0; }
.date-card .btn { margin-top: auto; align-self: flex-start; }
.dates-foot { max-width: 1120px; margin: 1.25rem auto 0; display: flex; flex-wrap: wrap;
  gap: .75rem 1.25rem; align-items: center; justify-content: center; color: #4A4A4A; font-size: .98rem; }
.dates-like { background: none; border: 1px solid var(--line); border-radius: 999px; padding: .45rem .95rem;
  color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; min-height: 44px; }
.dates-like:hover { border-color: var(--accent-ink); }

/* Цели нажатия в контактах и подвале на телефоне (07.10.2026).
   Ссылки «почта» и «вк» были высотой 24px — для пальца человека 50+ мало. */
@media (max-width: 760px) {
  #contacts a[href^="mailto:"],
  #contacts a[href*="vk.com"],
  #contacts a[href*="ok.ru"],
  .site-footer a[href^="mailto:"],
  .site-footer a[href*="vk.com"],
  .site-footer a[href*="ok.ru"],
  a[href="/news.html"],
  a[href*="news.html"] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
