:root {
  --bg: #f5f9ff;
  --card: #ffffff;
  --line: #d3e4f8;
  --line-strong: #9cc4f2;
  --text: #13233a;
  --muted: #5b6b82;
  --blue-900: #0f3a9e;
  --blue-700: #1d5fe0;
  --blue-500: #2f8cf5;
  --radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--blue-900); text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(245, 249, 255, 0.85);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }

/* Логотипный стиль, «вариант B»: белые буквы, голубая внутренняя обводка, тёмная внешняя с тенью.
   Rubik 900, растянут на 12%. Три слоя одного текста: сам текст — тёмная обводка с тенью,
   ::before — голубая обводка, ::after — белые буквы.
   .vlogo — слово ВИтонИК в одну строку; .alogo — заголовок проекта, может переноситься.
   Разметка: <… class="vlogo" data-text="ВИтонИК">ВИтонИК</…> */
.vlogo, .alogo {
  position: relative;
  font-family: "Rubik", "Manrope", system-ui, sans-serif;
  font-weight: 900;
  transform: scaleX(1.12);
  transform-origin: left center;
  color: #05122e;
  -webkit-text-stroke: .2em #05122e;
  text-shadow: 0 .03em .1em rgba(0, 10, 40, .7);
}
.vlogo::before, .vlogo::after,
.alogo::before, .alogo::after {
  content: attr(data-text);
  content: attr(data-text) / "";   /* декоративные слои не читаются экранными дикторами */
  position: absolute; inset: 0;
  text-shadow: none;
}
.vlogo::before, .alogo::before { color: #3592f0; -webkit-text-stroke: .09em #3592f0; }
.vlogo::after, .alogo::after { color: #fff; -webkit-text-stroke: 0; }
.vlogo:hover, .alogo:hover { text-decoration: none; }
.vlogo {
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
  margin-right: .6em;   /* растяжение не меняет место в потоке, поэтому справа запас */
}
/* .alogo — заголовок проекта: может переноситься по строкам */
.alogo {
  display: block;
  max-width: calc(100% / 1.12);   /* после растяжения на 12% не вылезает за край */
  line-height: 1.2;
}
.top .vlogo { font-size: 26px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--muted); font-weight: 600; font-size: 15px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid transparent;
}
.nav a:hover, .nav a.active { color: var(--blue-700); border-color: var(--line-strong); text-decoration: none; }

/* Страница проекта: в шапке рядом с ВИтонИК появляется название проекта */
.brand-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-sep { font-size: 26px; font-weight: 800; line-height: 1; color: var(--blue-500); }
.top .header-title { display: inline-block; max-width: none; white-space: nowrap; font-size: 22px; }
/* Заголовок в шапке (.auto-hide) скрыт, пока виден большой заголовок страницы, и всплывает
   при прокрутке. Классы ставит js/header-title.js; без JS заголовок виден всегда. */
.logo-auto .top .auto-hide {
  transition:
    opacity .45s ease, translate .55s cubic-bezier(.2, .8, .2, 1),
    filter .45s ease, visibility 0s linear 0s;
}
.logo-auto.hero-visible .top .auto-hide {
  opacity: 0;
  translate: 0 14px;
  filter: blur(6px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .3s ease, translate .3s ease, filter .3s ease, visibility 0s linear .3s;
}
@media (prefers-reduced-motion: reduce) {
  .logo-auto .top .auto-hide, .logo-auto.hero-visible .top .auto-hide { transition: none; translate: none; filter: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: 96px 88px; text-align: center; }
.hero h1.vlogo {
  display: block; width: fit-content; margin: 0 auto;
  font-size: clamp(56px, 12vw, 128px);
  transform-origin: center;
}
/* Фон hero: нарисованное небо (img/sky.svg, генерируется tools/gen-sky.py) */
.hero-sky {
  background: url(img/sky.svg) center / cover no-repeat, #f4f8ff;
  border-bottom: 1px solid var(--line);
}
/* Подзаголовок растягивается по ширине надписи ВИтонИК: межбуквенный интервал
   подбирает скрипт index.html; без JS остаётся обычная разрядка .18em */
.hero .since {
  display: block; width: fit-content; margin: 18px auto 0;
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  white-space: nowrap;
  color: var(--blue-500);
}
.hero .actions { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center;
  padding: 10px 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px;
  background: transparent; border: 1px solid var(--line);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; background: #fff; }
.btn-primary { color: var(--blue-900); border-color: var(--line-strong); }
.btn-primary:hover { color: var(--blue-900); border-color: var(--blue-500); }
.btn-ghost { color: var(--blue-500); }
.btn-ghost:hover { color: var(--blue-700); border-color: var(--line-strong); }

/* ---------- Sections ---------- */
section { padding-block: 28px; }
.eyebrow {
  font-size: 13px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--blue-500); margin: 0 0 8px;
}
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.2; margin: 0 0 20px; font-weight: 800; }
h3 { font-size: 20px; margin: 0 0 8px; font-weight: 800; }
.signature { margin: 18px 0 0; font-weight: 700; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}
.card h2 { margin-bottom: 16px; }
.card > :last-child { margin-bottom: 0; }

/* ---------- Highlight («Главное») ---------- */
.highlight {
  border-radius: 28px; padding: 40px;
  background: #fff;
  border: 1px solid var(--line-strong);
}
.highlight .badge {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--blue-700); border: 1px solid var(--line-strong); padding: 3px 12px; border-radius: 999px; margin-bottom: 14px;
}
.highlight h2 { margin-bottom: 12px; }
.highlight p { margin: 0 0 8px; }
.highlight .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Projects: один блок-список, новое сверху ---------- */
.projects-list { list-style: none; margin: 0; padding: 0; }
.projects-list > li { padding-block: 20px; border-top: 1px solid var(--line); }
.projects-list > li:first-child { border-top: 0; padding-top: 4px; }
.projects-list > li:last-child { padding-bottom: 0; }
.projects-list ul { list-style: disc; margin: 8px 0 0; padding-left: 1.2em; color: var(--muted); font-size: 16px; }
.projects-list ul li { margin-block: 2px; }
.projects-list .years { font-size: 13px; font-weight: 700; color: var(--blue-500); letter-spacing: 0.04em; margin-bottom: 4px; }
.projects-list h3 { margin: 0 0 6px; }
.projects-list h3 a { color: inherit; }
.projects-list p { margin: 0; color: var(--muted); font-size: 16px; }
.projects-list .more { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 15px; }

/* ---------- Lists ---------- */
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.checks + p { margin-top: 20px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 18px; height: 18px; border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%231d5fe0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

.links-list { display: grid; gap: 12px; }
.link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; border-radius: 16px; background: #fff; border: 1px solid var(--line);
  color: var(--text); transition: border-color .15s, transform .15s;
}
.link-row:hover { border-color: var(--line-strong); text-decoration: none; transform: translateY(-1px); color: var(--text); }
.link-row strong { display: block; }
.link-row span { color: var(--muted); font-size: 15px; }
.link-row .arrow { color: var(--blue-700); font-weight: 800; font-size: 20px; }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding-block: 72px 24px; }
.page-head h1 { font-size: clamp(36px, 6vw, 60px); margin: 6px 0 18px; }
.page-head .lead { font-size: 20px; color: var(--muted); max-width: 720px; margin: 0; }

/* ---------- Footer ---------- */
footer { padding-block: 40px 56px; color: var(--muted); font-size: 15px; border-top: 1px solid var(--line); margin-top: 40px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .highlight { padding: 28px; }
  .hero { padding-block: 64px 48px; }
  .nav a { padding: 6px 8px; font-size: 14px; }
}
/* Не хватает места под ВИтонИК, название проекта и меню в одну строку:
   шапка страницы проекта в два ряда — названия сверху, меню под ними */
@media (max-width: 900px) {
  .top-project .wrap { flex-wrap: wrap; height: auto; padding-block: 10px; row-gap: 2px; }
  .top-project .nav { margin-left: -12px; }
}
@media (max-width: 520px) {
  .top .wrap { height: auto; padding-block: 10px; flex-direction: column; gap: 4px; }
  /* на телефоне и в два ряда оба названия не помещаются: название проекта встаёт на место ВИтонИК */
  .logo-auto:not(.hero-visible) .brand-row .vlogo { display: none; }
  .logo-auto.hero-visible .brand-row .header-title { display: none; }
  .brand-sep { display: none; }
  .top .header-title { transform-origin: center; }
  .top-project .nav { margin-left: 0; }
  .card { padding: 24px; }
}
