@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,700;1,8..60,400&family=Inter:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f6f1e7;
  --bg-card: #ffffff;
  --text: #2b2822;
  --text-muted: #6e675b;
  --accent: #4f6f3a;        /* ботва */
  --accent-hover: #3d5a2c;
  --earth: #8a5a2b;         /* клубень */
  --flower: #7b5ea7;        /* цветок */
  --flower-light: #efe9f7;
  --pollen: #d9a521;        /* тычинки */
  --pollen-light: #f8efd3;
  --leaf-light: #e9efdf;
  --border: #e3dccd;
  --radius: 6px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 241, 231, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 820px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 26px; height: 26px; flex: none; }
.logo {
  font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 22px;
  letter-spacing: 1px; color: var(--text);
}
.logo span { color: var(--accent); }
.logo:hover { color: var(--text); }
.logo-sub { font-size: 13px; color: var(--text-muted); margin-left: 4px; }
.nav { display: flex; gap: 24px; }
.nav a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--text); }

/* ── Featured ── */
.featured { max-width: 820px; margin: 48px auto 0; padding: 0 24px; }
.featured-card {
  display: block;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}
.featured-card:hover { color: #fff; }
.featured-card::after {
  content: '';
  position: absolute; right: -30px; bottom: -30px;
  width: 200px; height: 200px;
  border: 40px solid rgba(255,255,255,.06);
  border-radius: 50%;
}
.featured-card .flower-deco {
  position: absolute; right: 28px; top: 24px;
  width: 120px; height: 120px; opacity: .9;
}
.featured-card .tag { background: rgba(255,255,255,.2); color: #fff; border: none; }
.featured-card h2 {
  font-family: 'Source Serif 4', serif; font-size: 28px; font-weight: 700;
  line-height: 1.3; margin: 16px 0 12px; max-width: 560px; position: relative; z-index: 1;
}
.featured-card .excerpt { color: rgba(255,255,255,.85); max-width: 540px; position: relative; z-index: 1; }
.featured-card .meta { color: rgba(255,255,255,.65); }

/* ── Cards ── */
.cards {
  max-width: 820px; margin: 32px auto 64px; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--c, var(--accent));
  border-radius: var(--radius);
  padding: 26px 28px;
  color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover {
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(80, 60, 30, .08);
}
.card h2 {
  font-family: 'Source Serif 4', serif; font-size: 21px; font-weight: 700;
  line-height: 1.35; margin: 14px 0 10px;
}
.card:hover h2 { color: var(--c, var(--accent)); }

.excerpt { color: var(--text-muted); font-size: 15px; line-height: 1.6; }

.tag {
  display: inline-block;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--c, var(--accent));
  border: 1px solid var(--c, var(--accent));
  border-radius: 3px; padding: 3px 8px;
}

/* цвета рубрик */
.t-history { --c: var(--earth); }
.t-science { --c: var(--flower); }
.t-biology { --c: var(--accent); }
.t-today   { --c: #b8860b; }

.meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-muted); margin-top: 14px; }

/* ── Hero strip ── */
.intro {
  max-width: 820px; margin: 40px auto 0; padding: 0 24px;
  color: var(--text-muted); font-size: 15px;
}

/* ── Article ── */
.article { max-width: 680px; margin: 0 auto; padding: 40px 24px 80px; }
.back-link { font-size: 14px; color: var(--text-muted); display: inline-block; margin-bottom: 32px; }
.back-link:hover { color: var(--accent); }
.article h1 {
  font-family: 'Source Serif 4', serif; font-size: 34px; font-weight: 700;
  line-height: 1.25; margin: 16px 0 10px;
}
.article .lead { font-family: 'Source Serif 4', serif; font-size: 19px; font-style: italic; color: var(--text-muted); }
.article > .meta { padding-bottom: 28px; border-bottom: 1px solid var(--border); margin-bottom: 36px; }

.content p { margin-bottom: 18px; font-size: 16.5px; line-height: 1.75; }
.content h2 {
  font-family: 'Source Serif 4', serif; font-size: 22px; font-weight: 700;
  margin: 40px 0 16px; color: var(--text);
}
.content ul, .content ol { margin: 0 0 18px 24px; font-size: 16.5px; }
.content li { margin-bottom: 6px; }
.content em { color: var(--text-muted); }
.content strong { color: var(--text); }

.callout {
  background: var(--pollen-light);
  border-radius: var(--radius);
  padding: 20px 24px; margin: 28px 0;
}
.callout-title {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  color: #a07a10; margin-bottom: 8px;
}
.callout p { margin-bottom: 0; font-size: 15.5px; }
.callout.violet { background: var(--flower-light); }
.callout.violet .callout-title { color: var(--flower); }
.callout.green { background: var(--leaf-light); }
.callout.green .callout-title { color: var(--accent); }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin: 28px 0;
}
.stat {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 4px solid var(--c, var(--earth));
  border-radius: var(--radius); padding: 16px;
}
.stat b { display: block; font-family: 'Source Serif 4', serif; font-size: 24px; color: var(--c, var(--earth)); }
.stat span { font-size: 13px; color: var(--text-muted); }

.figure { margin: 32px 0; text-align: center; }
.figure svg { width: 100%; height: auto; max-width: 620px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.figure-caption { font-size: 13px; color: var(--text-muted); margin-top: 8px; font-style: italic; }

.sources {
  font-size: 14px; color: var(--text-muted);
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--border);
}
.sources h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text); margin-bottom: 10px; }
.sources ul { margin-left: 20px; }
.sources li { margin-bottom: 6px; font-size: 14px; }

.next {
  margin-top: 36px; padding: 18px 22px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px;
}

/* ── Footer ── */
.site-footer {
  max-width: 820px; margin: 0 auto; padding: 24px;
  text-align: center; font-size: 13px; color: var(--text-muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 680px) {
  .cards { grid-template-columns: 1fr; }
  .featured-card { padding: 32px 24px; }
  .featured-card h2 { font-size: 22px; }
  .featured-card .flower-deco { width: 70px; height: 70px; right: 14px; top: 14px; opacity: .5; }
  .card { padding: 22px 20px; }
  .article h1 { font-size: 26px; }
  .logo-sub { display: none; }
}
