/* velichko.ru — светлая тема: кремовый фон, тёмно-зелёный акцент; тёмная (по системной настройке) —
   тёплый графит и шалфейно-зелёный акцент. Заголовки Literata, текст Mulish. */
:root {
  --bg: #fefdfa;
  --bg-2: #ffffff;
  --line: #ebe6dc;
  --text: #1a1f1a;
  --muted: #5f5b53;
  --gold: #0f4a2c;   /* акцент: тёмно-зелёный */
  --gold-2: #0a3820; /* акцент при наведении */
  --top-bg: rgba(254, 253, 250, .92); /* шапка при прокрутке */
  --logo-filter: none; /* логотипы компаний нарисованы тёмным */
  --display: "Literata", Georgia, serif;
  --sans: "Mulish", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --wrap: 1120px;
  --gut: clamp(16px, 4vw, 40px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --bg-2: #1f1e1b;
    --line: #2f2d29;
    --text: #ece8df;
    --muted: #a8a296;
    --gold: #7fb896;
    --gold-2: #9ccbae;
    --top-bg: rgba(23, 22, 20, .92);
    --logo-filter: invert(1) brightness(.92);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gut); top: 12px; z-index: 50; background: var(--text); color: var(--bg); padding: 8px 12px; }

/* ---------- Шапка и меню ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 30;
  transition: border-color .4s;
  border-bottom: 1px solid transparent;
}
/* Подложка шапки — отдельным слоем: backdrop-filter на самой .top делает её рамкой
   для position: fixed, и мобильное меню сжималось до высоты шапки. */
.top::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: transparent; transition: background .4s;
}
.top.is-scrolled { border-color: var(--line); }
.top.is-scrolled::before { background: var(--top-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font: 400 1.1rem/1 var(--display); letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
}
/* Фамильный знак: двойной шеврон в двойном кольце, рисуется линиями цвета акцента. */
.brand-mark { width: 38px; height: 38px; flex: none; fill: none; stroke: var(--gold); color: var(--gold); }
.nav { display: flex; gap: clamp(14px, 2.4vw, 32px); }
.nav a {
  position: relative; text-decoration: none; font-size: .9rem; letter-spacing: .06em; color: var(--muted);
  transition: color .25s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right; transition: transform .35s ease;
}
.nav a:hover, .nav a.is-current { color: var(--text); }
.nav a:hover::after, .nav a.is-current::after { transform: scaleX(1); transform-origin: left; }
.burger { display: none; }

@media (max-width: 860px) {
  .burger {
    display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; color: var(--text); position: relative; z-index: 2;
  }
  .burger span, .burger span::before, .burger span::after {
    display: block; width: 24px; height: 1.5px; background: currentColor; transition: transform .4s, opacity .3s;
  }
  .burger span { position: relative; }
  .burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
  .burger span::before { top: -7px; }
  .burger span::after { top: 7px; }
  .is-menu .burger span { background: transparent; }
  .is-menu .burger span::before { transform: translateY(7px) rotate(45deg); }
  .is-menu .burger span::after { transform: translateY(-7px) rotate(-45deg); }
  /* Выпадающая панель под шапкой: перекрывает часть экрана, страница под ней притенена. */
  .nav {
    position: fixed; inset: 72px 0 auto; flex-direction: column; gap: 0;
    max-height: calc(100svh - 72px); overflow-y: auto;
    padding: 4px var(--gut) 12px; background: var(--bg-2);
    border-bottom: 1px solid var(--line); box-shadow: 0 24px 48px rgba(0, 0, 0, .18);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .22s, transform .22s, visibility 0s .22s;
  }
  .is-menu .nav { opacity: 1; visibility: visible; transform: none; transition: opacity .22s, transform .22s; }
  .nav a {
    display: flex; align-items: center; min-height: 52px;
    font: 600 1.05rem/1.2 var(--sans); letter-spacing: 0; color: var(--text);
    border-bottom: 1px solid var(--line);
  }
  .nav a:last-child { border-bottom: 0; }
  .nav a.is-current { color: var(--gold); }
  .nav a::after { display: none; }
  .is-menu .top::before { background: var(--bg-2); }
  .is-menu body::after {
    content: ""; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .35);
  }
  .is-menu { overflow: hidden; }
}

/* ---------- Первый экран ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 88px 0 28px; }
.hero .wrap { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 16px 48px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 1rem + 3.4vw, 4rem); max-width: none; margin: 12px 0 10px; white-space: nowrap; }
.hero h1 em, h2 em { font-style: italic; color: var(--gold); }
.hero-art { width: auto; height: 150px; color: var(--gold); }
/* Три блока портрета: весь первый экран помещается в одно окно от 1280×720 */
.pillars { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 36px; margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.pillar p { margin: 0 0 10px; font-size: .92rem; line-height: 1.5; }
.pillar .kicker { margin-bottom: 12px; }
.teams { margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.teams dt { font: 700 .72rem/1 var(--mono); letter-spacing: .08em; color: var(--text); }
.teams dd { margin: 6px 0 0; font-size: .86rem; line-height: 1.5; color: var(--muted); }
@media (max-width: 860px) {
  .hero { min-height: auto; padding: 96px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 16px; }
  .hero-art { order: -1; height: 120px; }
  .pillars, .teams { grid-template-columns: 1fr; gap: 22px; }
}
.kicker { font: 700 .75rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2.5rem, 1.2rem + 4.2vw, 5.2rem); line-height: 1.04; max-width: 15ch; margin: 22px 0 28px; }
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--muted); max-width: 36em; margin: 0 0 14px; }
.lead strong { color: var(--text); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 28px;
  font: 800 .8rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  background: var(--gold); color: var(--bg); border: 1px solid var(--gold);
  transition: background .25s, color .25s;
}
.btn:hover { background: var(--gold-2); border-color: var(--gold-2); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: transparent; border-color: var(--gold); color: var(--gold-2); }

/* ---------- Секции ---------- */
section { padding: clamp(72px, 10vw, 140px) 0; border-top: 1px solid var(--line); }
.head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
h2 { font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem); line-height: 1.08; max-width: 18ch; }
/* Заголовок раздела, который стал отдельной страницей: h1 по смыслу, размер как у h2 */
.page-title { font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem); line-height: 1.08; max-width: 18ch; margin: 0; }
.contact .page-title { margin: 18px auto 22px; max-width: 16ch; }
main > section:first-child { border-top: 0; padding-top: clamp(120px, 12vw, 170px); }
h3 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.8rem); line-height: 1.2; margin-bottom: 14px; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); }
.cols { display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.dash { list-style: none; padding: 0; margin: 0 0 18px; }
.dash li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.dash li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.card { border: 1px solid var(--line); background: var(--bg-2); padding: clamp(22px, 3vw, 36px); }
.note { border-left: 1px solid var(--gold); padding-left: 20px; color: var(--muted); }
.note strong { color: var(--text); }

/* Подход: шаги */
.steps { counter-reset: s; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 0 20px; padding: 26px 0; border-top: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s, decimal-leading-zero); font: 400 1.6rem/1 var(--display); color: var(--gold); }
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); }
.questions { font: 400 clamp(1.2rem, 1rem + .8vw, 1.6rem)/1.45 var(--display); }
.questions p { margin: 0 0 6px; }
.quote { font: 400 clamp(1.6rem, 1.1rem + 2vw, 2.6rem)/1.2 var(--display); max-width: 22ch; margin: 48px 0 0; }

/* Кейсы */
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(28px, 6vw, 72px); margin: 0 0 clamp(40px, 6vw, 72px); }
.logos img { height: 30px; width: auto; opacity: .7; transition: opacity .3s; filter: var(--logo-filter); }
.logos img:hover { opacity: 1; }
.logos .tall { height: 44px; }
.case { padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--line); display: grid; gap: 10px 48px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .case { grid-template-columns: 1fr 1.25fr; } }
.case .role { font: 700 .72rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.nums { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.nums li { padding-left: 26px; position: relative; color: var(--muted); }
.nums li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.nums b { color: var(--text); font-weight: 700; }
.plan { width: 100%; border-collapse: collapse; margin: 18px 0 0; font-size: .95rem; }
.plan th, .plan td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.plan th { font: 700 .7rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.plan td:last-child { color: var(--gold-2); font-weight: 700; }

/* Статьи */
.posts { display: grid; gap: 0; }
.post {
  display: grid; grid-template-columns: 120px 1fr; gap: 6px 28px; padding: 26px 0; border-top: 1px solid var(--line);
  text-decoration: none; transition: padding .3s;
}
.post:hover { padding-left: 10px; }
.post time { font: 500 .8rem/1.8 var(--mono); color: var(--muted); }
.post h3 { margin: 0 0 6px; transition: color .25s; }
.post:hover h3 { color: var(--gold-2); }
.post p { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .post { grid-template-columns: 1fr; } }

/* Обо мне */
.offwork { max-width: 46em; }
.trips { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 28px; }
.trips figure { margin: 0; }
.trips img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.trips figcaption { font-size: .82rem; color: var(--muted); margin-top: 8px; }
@media (min-width: 900px) { .trips { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Связь */
.contact { text-align: center; }
.contact h2 { margin: 18px auto 22px; max-width: 16ch; }
.contact .lead { margin: 0 auto; }
.contact .actions { justify-content: center; }
.tg { font: 400 clamp(1.4rem, 1rem + 1.6vw, 2.2rem)/1 var(--display); color: var(--gold-2); text-decoration: none; display: inline-block; margin-top: 26px; }

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: .85rem; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* Статья */
.article { padding: 140px 0 80px; border: 0; }
.article .wrap { max-width: 760px; }
.article h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.8rem); max-width: none; margin: 18px 0 18px; }
.article .meta { color: var(--muted); font-size: .9rem; margin-bottom: 40px; }
.prose h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin: 48px 0 16px; max-width: none; }
.prose h3 { margin: 32px 0 12px; }
.prose a { color: var(--gold-2); }
.back { display: inline-block; margin-top: 48px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }

/* Появление при прокрутке */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* Уведомление о cookie */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 520px; margin-left: auto;
  display: flex; gap: 16px; align-items: center; padding: 14px 16px; font-size: .85rem;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--muted);
}
.cookie button { flex: none; background: var(--text); color: var(--bg); border: 0; padding: 10px 16px; font: 800 .72rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.cookie[hidden] { display: none; }

/* Курсор-агент: стрелку рисует система (без задержки), подпись двигается в том же кадре */
@media (hover: hover) and (pointer: fine) {
  html.agent, html.agent a, html.agent button {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cpath d='M3 2l18 8.5-7.6 2.1L10 20z' fill='%231a1f1a' stroke='%23fefdfa' stroke-width='1.4' stroke-linejoin='round'/%3E%3Ccircle cx='21' cy='20' r='3' fill='%230f4a2c'/%3E%3C/svg%3E") 3 2, auto;
  }
  @media (prefers-color-scheme: dark) {
    html.agent, html.agent a, html.agent button {
      cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cpath d='M3 2l18 8.5-7.6 2.1L10 20z' fill='%23ece8df' stroke='%23171614' stroke-width='1.4' stroke-linejoin='round'/%3E%3Ccircle cx='21' cy='20' r='3' fill='%237fb896'/%3E%3C/svg%3E") 3 2, auto;
    }
  }
  .agent-tag {
    position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
    font: 500 .7rem/1 var(--mono); letter-spacing: .04em; color: var(--bg); background: var(--gold);
    padding: 5px 7px; white-space: nowrap; opacity: 0; transition: opacity .2s;
  }
  .agent-tag.is-on { opacity: 1; }
  .agent-tag::before { content: "● "; font-size: .6rem; }
}
@media not ((hover: hover) and (pointer: fine)) { .agent-tag { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0s !important; }
}
