/* =========================================================
   ШАГ — демо-тема для информационного сайта
   Редакционная типографика · тёплая палитра · структура docs
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Палитра — тёплый «бумажный» минимализм */
  --paper:      #F6F3EC;   /* фон страницы — тёплый песочный */
  --paper-2:    #EFEAE0;   /* фон секций / карточек */
  --paper-3:    #E7E0D3;   /* разделители, рамки */
  --ink:        #23211C;   /* основной текст — графит */
  --ink-soft:   #5C574E;   /* вторичный текст */
  --ink-faint:  #908A7E;   /* подписи, мета */
  --accent:     #9C4A2E;   /* приглушённая терракота — единственный акцент */
  --accent-2:   #2E4257;   /* глубокий чернильно-синий — для ссылок */
  --line:       #D9D2C4;

  --maxw: 1120px;
  --gap: clamp(1.2rem, 4vw, 3rem);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gap); }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gap); }

/* ---------- Типографика ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); margin: 0 0 .5em; }
h3 { font-size: 1.35rem; margin: 0 0 .4em; }
p { margin: 0 0 1.1em; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.kicker {
  font-family: var(--sans);
  font-size: .78rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4em;
  display: inline-block;
}
.lead { font-size: 1.2rem; color: var(--ink-soft); line-height: 1.6; }
.muted { color: var(--ink-faint); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: baseline; gap: .55rem; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--ink); letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--accent); }
.brand small { font-family: var(--sans); font-size: .68rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.nav { display: flex; align-items: center; gap: 1.05rem; }
.nav a { color: var(--ink-soft); font-size: .82rem; font-weight: 500; white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--accent); }
.menu-toggle { display: none; }

/* Выпадающее меню «Главная» */
.dropdown { position: relative; }
.dropdown .dropbtn { color: var(--ink-soft); font-size: .82rem; font-weight: 500; cursor: pointer; }
.dropdown:hover .dropbtn, .dropdown:focus-within .dropbtn { color: var(--ink); }
.dropdown .dropbtn.active { color: var(--accent); }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: -.6rem; min-width: 248px;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(40,35,28,.12);
  padding: .35rem 0; opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s; z-index: 40;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: .55rem 1.1rem; font-size: .9rem; color: var(--ink-soft); white-space: nowrap; }
.dropdown-menu a small { display: block; font-size: .76rem; color: var(--ink-faint); }
.dropdown-menu a:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.dropdown-menu a.active { color: var(--accent); }

/* ---------- Вариант 2: hero-обложка ---------- */
.hero-cover {
  position: relative; min-height: 80vh; display: flex; align-items: center;
  background: #1b1915 center/cover no-repeat;
  background-image: linear-gradient(180deg, rgba(20,18,15,.45), rgba(20,18,15,.78)),
    url('https://images.unsplash.com/photo-1543269865-cbf427effbad?auto=format&fit=crop&w=2000&q=70');
}
.hero-cover .wrap { position: relative; z-index: 2; text-align: center; max-width: 900px; }
.hero-cover .kicker { color: #e9c4b4; }
.hero-cover h1 { color: #fff; margin: 0 auto .5em; max-width: 18ch; }
.hero-cover .lead { color: rgba(255,255,255,.88); max-width: 56ch; margin: 0 auto 2.2rem; }
.hero-cover .hero-actions { justify-content: center; }
.btn-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-light:hover { background: #fff; color: var(--ink); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; }
.stat .num { font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 3.6rem); color: var(--accent); line-height: 1; }
.stat .cap { color: var(--ink-soft); margin-top: .5rem; font-size: .98rem; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; gap: 1.5rem; } }

.features4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 820px) { .features4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .features4 { grid-template-columns: 1fr; } }
.feature { text-align: center; padding: 1.5rem 1rem; }
.feature .ic { font-family: var(--serif); font-size: 1.6rem; color: var(--accent); border: 1px solid var(--line); width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.2rem; }
.feature h3 { font-size: 1.15rem; }
.feature p { color: var(--ink-soft); font-size: .92rem; margin: 0; }

.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: s4; }
@media (max-width: 820px) { .steps4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .steps4 { grid-template-columns: 1fr; } }
.step4 { counter-increment: s4; }
.step4 .n { font-family: var(--serif); font-size: 1.1rem; color: var(--accent); margin-bottom: .6rem; }
.step4 .n::before { content: counter(s4, decimal-leading-zero); }
.step4 h3 { font-size: 1.1rem; margin-bottom: .25em; }
.step4 p { color: var(--ink-soft); font-size: .9rem; margin: 0; }

@media (max-width: 820px) {
  .nav { display: none; }
}

/* ---------- Кнопки / тихие ссылки ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans); font-size: .95rem; font-weight: 500;
  padding: .7rem 1.4rem; border-radius: 2px;
  border: 1px solid var(--ink);
  color: var(--ink); background: transparent;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn-accent { border-color: var(--accent); color: var(--accent); }
.btn-accent:hover { background: var(--accent); color: var(--paper); }
.link-arrow { font-weight: 500; }
.link-arrow::after { content: " →"; }

/* ---------- Секции ---------- */
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-alt { background: var(--paper-2); }
.section-head { max-width: 640px; margin-bottom: 3rem; }
.eyebrow-rule { display: flex; align-items: center; gap: 1rem; margin-bottom: 2.5rem; }
.eyebrow-rule .line { flex: 1; height: 1px; background: var(--line); }
.eyebrow-rule span { font-size: .8rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-faint); }

/* ---------- Hero ---------- */
.hero { padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem); }
.hero h1 { max-width: 14ch; }
.hero .lead { max-width: 52ch; margin-bottom: 2.2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* ---------- Две дорожки ---------- */
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); }
.track { padding: clamp(2rem, 4vw, 3rem); }
.track + .track { border-left: 1px solid var(--line); }
.track .num { font-family: var(--serif); font-size: 1rem; color: var(--accent); }
@media (max-width: 720px) {
  .tracks { grid-template-columns: 1fr; }
  .track + .track { border-left: none; border-top: 1px solid var(--line); }
}

/* ---------- Шестиходовка / шаги ---------- */
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  display: grid; grid-template-columns: 4rem 1fr; gap: 1.5rem;
  padding: 1.6rem 0; border-top: 1px solid var(--line);
  align-items: baseline;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step .step-num { font-family: var(--serif); font-size: 1.6rem; color: var(--accent); }
.step h3 { margin-bottom: .25em; }
.step p { margin: 0; color: var(--ink-soft); }

/* ---------- Карточки (курсы / продукты) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.cards.cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--paper); border: 1px solid var(--line);
  padding: 1.8rem; display: flex; flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
}
.section-alt .card { background: var(--paper); }
.card:hover { border-color: var(--ink); }
.card .tag { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--ink-soft); font-size: .96rem; flex: 1; }
.card .meta { display: flex; gap: 1.2rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-faint); }
a.card { color: inherit; }
a.card:hover { text-decoration: none; }
a.card .more { margin-top: 1rem; font-size: .88rem; font-weight: 500; color: var(--accent); }
a.card .more::after { content: " →"; }

/* ---------- Страница курса ---------- */
.course-meta { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-top: 1.8rem; padding-top: 1.6rem; border-top: 1px solid var(--line); max-width: 760px; }
.course-meta .k { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); margin-bottom: .2rem; }
.course-meta .v { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); }
.syllabus { counter-reset: mod; margin: 0; padding: 0; list-style: none; }
.syllabus li { counter-increment: mod; display: grid; grid-template-columns: 3rem 1fr; gap: 1.2rem; padding: 1.2rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.syllabus li:last-child { border-bottom: 1px solid var(--line); }
.syllabus li::before { content: counter(mod, decimal-leading-zero); font-family: var(--serif); font-size: 1.2rem; color: var(--accent); }
.syllabus h3 { font-size: 1.15rem; margin: 0 0 .2em; }
.syllabus p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { padding: .4rem 0 .4rem 1.6rem; position: relative; color: var(--ink-soft); }
.checklist li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Команда: фото ---------- */
.team-card { padding-top: 0; overflow: hidden; }
.team-photo { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; background: var(--paper-2); margin: -1px -1px 1.4rem; width: calc(100% + 2px); filter: grayscale(15%); }
.team-photo.placeholder { display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 3rem; color: var(--ink-faint); background: var(--paper-3); }
.team-card .body { padding: 0 1.8rem 1.8rem; }
.team-card h3 { margin-bottom: .2em; }
.team-card .role { color: var(--accent); font-size: .9rem; font-weight: 500; margin-bottom: .6rem; }
.team-card p { color: var(--ink-soft); font-size: .94rem; margin: 0; }
.team-card .note-small { font-size: .8rem; color: var(--ink-faint); margin-top: .8rem; }

/* ---------- Статья ---------- */
.article-head { max-width: 760px; margin: 0 auto 2.5rem; }
.article-head .post-cat { font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.2rem; }
.article-head h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.article-head .post-date { color: var(--ink-faint); font-size: .9rem; margin-top: 1rem; }
.article-body { max-width: 720px; margin: 0 auto; }
.article-body h2 { font-size: 1.6rem; margin-top: 2.2rem; }
.article-body p { font-size: 1.08rem; line-height: 1.7; }
.article-body blockquote { margin: 1.8rem 0; padding-left: 1.4rem; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 1.3rem; line-height: 1.4; color: var(--ink); }
.article-nav { max-width: 720px; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* ---------- Блог: список статей ---------- */
.posts { display: grid; gap: 0; }
.post {
  display: grid; grid-template-columns: 140px 1fr; gap: 2rem;
  padding: 2rem 0; border-top: 1px solid var(--line);
}
.post:last-child { border-bottom: 1px solid var(--line); }
.post .post-date { font-size: .85rem; color: var(--ink-faint); }
.post .post-cat { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-top: .4rem; }
.post h3 { font-size: 1.5rem; margin-bottom: .35em; }
.post h3 a { color: var(--ink); }
.post p { color: var(--ink-soft); margin: 0; max-width: 60ch; }
@media (max-width: 640px) { .post { grid-template-columns: 1fr; gap: .5rem; } }

/* ---------- Методика: docs-раскладка ---------- */
.docs { display: grid; grid-template-columns: 240px 1fr; gap: 3.5rem; align-items: start; }
.docs-toc { position: sticky; top: 96px; }
.docs-toc .toc-title { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1rem; }
.docs-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.docs-toc li { counter-increment: toc; margin: 0; }
.docs-toc a { display: block; padding: .42rem 0; font-size: .92rem; color: var(--ink-soft); border-left: 2px solid transparent; padding-left: .9rem; }
.docs-toc a::before { content: counter(toc, decimal-leading-zero) "  "; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.docs-toc a:hover { color: var(--ink); text-decoration: none; border-left-color: var(--accent); }
.docs-body h2 { scroll-margin-top: 96px; padding-top: 1rem; }
.docs-body h2:first-child { padding-top: 0; }
.docs-body section { padding: 0 0 2.8rem; border: none; }
.glossary dt { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); margin-top: 1.2rem; }
.glossary dd { margin: .2rem 0 0; color: var(--ink-soft); }
@media (max-width: 820px) {
  .docs { grid-template-columns: 1fr; gap: 2rem; }
  .docs-toc { position: static; }
  .docs-toc ol { columns: 2; }
}

/* ---------- Контактная форма ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; gap: 2rem; } }
.field { margin-bottom: 1.4rem; }
.field label { display: block; font-size: .85rem; font-weight: 500; color: var(--ink-soft); margin-bottom: .45rem; }
.field input, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  padding: .8rem .9rem; border-radius: 2px;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 130px; resize: vertical; }
.contact-info dt { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-top: 1.4rem; }
.contact-info dd { margin: .3rem 0 0; font-size: 1.05rem; }

/* ---------- Сноска / цитата ---------- */
.pull { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.3; color: var(--ink); max-width: 22ch; }
.note { background: var(--paper-2); border-left: 3px solid var(--accent); padding: 1.2rem 1.4rem; font-size: .96rem; color: var(--ink-soft); }

/* ---------- Подвал ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 2.5rem; color: var(--ink-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.site-footer h4 { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: var(--ink-soft); font-size: .95rem; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .85rem; color: var(--ink-faint); }
.footer-brand { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); margin-bottom: .6rem; }
