/* ─── Tokens ─── */
:root {
  --bg:        #f7f4ef;
  --bg-alt:    #ffffff;
  --bg-dark:   #1c1a16;
  --text:      #1c1a16;
  --text-muted:#6b6558;
  --accent:    #8B2D35;
  --accent-lt: #7ac990;
  --border:    #ddd9d0;
  --serif:     Georgia, serif;
  --sans:      'Manrope', sans-serif;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.img-fluid { max-width: 100%; height: auto; }

/* ─── Nav ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(48px, calc((100% - 1200px) / 2));
  height: 56px;
}
.nav-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  letter-spacing: 0.04em;
}
.nav-logo-mark {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--accent);
  font-weight: 700;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.5); letter-spacing: 0.02em; transition: color 0.15s; }
.nav-links a:hover { color: #fff; }
.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 7px 18px;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s !important;
}
.nav-cta:hover { background: #1f5e30 !important; }
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.nav-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255,255,255,0.7);
}

/* ─── Section base ─── */
section { border-bottom: 1px solid var(--border); }
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 48px;
}
.section-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-tag::after {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--accent);
}
h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
}
h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}
.lead {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 680px;
}

/* ─── Two-col layout ─── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.two-col-wide { grid-template-columns: 3fr 2fr; }

/* ─── Buttons ─── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  display: inline-block;
  transition: background 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: #1f5e30; color: #fff; }
.btn-ghost {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--text); }
.btn-ghost svg { width: 16px; height: 16px; }
.link-arrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.15s;
}
.link-arrow:hover { gap: 10px; }

/* ─── Social links ─── */
.social-links { display: flex; gap: 12px; }
.social-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
  transition: border-color 0.15s, color 0.15s;
}
.social-link:hover { border-color: var(--text); color: var(--text); }

/* ─── Footer ─── */
footer {
  background: var(--bg-dark);
  color: #fff;
  padding: 64px max(48px, calc((100% - 1200px) / 2));
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
}
.footer-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
}
.footer-desc { font-size: 14px; color: #7a7060; line-height: 1.65; }
.footer-nav { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-nav a { font-size: 14px; color: #7a7060; transition: color 0.15s; }
.footer-nav a:hover { color: #fff; }
.footer-nav-title { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #4a4540; margin-bottom: 16px; }
.footer-social { display: flex; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.footer-social-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #7a7060;
  border: 1px solid #333;
  padding: 8px 14px;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.footer-social-link:hover { border-color: var(--accent); color: var(--accent); }
.footer-copy { font-size: 12px; color: #4a4540; margin-top: 32px; }
.footer-copy a { color: #6b6558; }
.footer-copy a:hover { color: #fff; }

/* ─── Messages modal ─── */
.custom-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.custom-modal {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  max-width: 480px;
  width: 90%;
  padding: 32px;
}
.custom-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.custom-modal-header h5 { font-weight: 700; font-size: 18px; margin: 0; }
.custom-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
}
.custom-modal-body { margin-bottom: 24px; font-size: 15px; color: var(--text-muted); }
.custom-modal-footer { text-align: right; }

/* ─── Shared aside components ─── */
.aside-widget-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Author widget */
.author-widget { display: flex; flex-direction: column; gap: 12px; }
.author-widget-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
.author-widget-name { font-weight: 700; font-size: 16px; }
.author-widget-role { font-size: 13px; color: var(--text-muted); }
.author-widget-bio { font-size: 13px; color: var(--text-muted); line-height: 1.65; }
.author-widget-links { display: flex; gap: 8px; margin-top: 4px; }
.author-link {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 10px;
  transition: all 0.15s;
}
.author-link:hover { border-color: var(--accent); color: var(--accent); }

/* Related articles */
.related-list { display: flex; flex-direction: column; }
.related-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.related-item:first-child { border-top: 1px solid var(--border); }
.related-item-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.related-item-title { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--text); transition: color 0.15s; display: block; }
.related-item-title:hover { color: var(--accent); }
.related-item-date { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* Telegram widget */
.tg-widget { border: 1px solid var(--border); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.tg-widget-title { font-weight: 700; font-size: 15px; }
.tg-widget-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.tg-widget-btn {
  display: inline-block;
  border: 1px solid var(--border);
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: all 0.15s;
  align-self: flex-start;
}
.tg-widget-btn:hover { border-color: var(--accent); color: var(--accent); }

/* CTA widget */
.aside-cta { background: var(--bg-dark); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.aside-cta-title { font-weight: 700; font-size: 16px; color: #fff; line-height: 1.35; }
.aside-cta-desc { font-size: 13px; color: #7a7060; line-height: 1.6; }
.btn-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 11px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s;
  align-self: flex-start;
}
.btn-cta:hover { background: #1f5e30; color: #fff; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  nav { padding: 0 24px; }
  .two-col, .two-col-wide { grid-template-columns: 1fr; gap: 40px; }
  .section-inner { padding: 56px 24px; }
  footer { padding: 48px 24px; grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 600px) {
  nav { padding: 0 16px; }
  .nav-links {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 8px 16px 16px;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { border-bottom: 1px solid rgba(255,255,255,0.05); }
  .nav-links a { padding: 12px 0; display: block; color: rgba(255,255,255,0.65); }
  .nav-cta { background: none !important; padding: 12px 0 !important; }
  .nav-mobile-toggle { display: flex; }
}
