/* ============================================================
   Аспро.Agile — направление B «Доска» (minimalist-ui)
   Палитра залочена брендом. Все текстовые пары проверены WCAG AA
   и APCA (см. манифест.md §5). Self-hosted шрифты, без CDN.
   ============================================================ */

/* ---------- Шрифты (self-hosted, кириллица сохранена) ---------- */
@font-face {
  font-family: "Unbounded";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/unbounded-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/unbounded-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+2018-2019,U+201C-201D,U+2013-2014;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/unbounded-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/unbounded-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+2018-2019,U+201C-201D,U+2013-2014;
}

@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/inter-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+2018-2019,U+201C-201D,U+2013-2014;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/inter-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+2018-2019,U+201C-201D,U+2013-2014;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/inter-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+2018-2019,U+201C-201D,U+2013-2014;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/jbmono-500-cyrillic.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/jbmono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+2018-2019,U+201C-201D,U+2013-2014;
}

/* ---------- Токены ---------- */
:root {
  --paper: #F6F5F2;
  --surface: #FFFFFF;
  --deep: #26263E;
  --ink: #1B1B1F;
  --ink-2: #5A5B66;
  --line: #E4E3DE;
  --blue: #3761E9;
  --blue-ink: #1C4ADE;
  --green: #35D3AC;
  --green-ink: #0F7A5F;
  --muted-on-deep: #DADBE4;

  --blue-wash: rgba(55, 97, 233, 0.06);
  --blue-line: rgba(55, 97, 233, 0.24);

  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --r-xs: 4px;
  --r-s: 8px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--blue); color: #FFFFFF; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

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

img, svg { display: block; max-width: 100%; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: var(--ink); color: #FFFFFF;
  padding: 8px 16px; border-radius: var(--r-s);
  font-size: 13px; z-index: 100;
  transition: top 160ms var(--ease);
}
.skip-link:focus { top: 8px; text-decoration: none; }

/* ---------- Мета / моно-лейблы ---------- */
.meta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.meta--dot { display: inline-flex; align-items: center; gap: 8px; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  flex: none;
}
.status-dot--blue { background: var(--blue); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  line-height: 1; padding: 16px 24px;
  border-radius: var(--r-s); border: 1px solid transparent;
  cursor: pointer; transition: background 180ms var(--ease), transform 120ms var(--ease);
  min-height: 48px;
}
.btn--primary { background: var(--blue); color: #FFFFFF; }
.btn--primary:hover { background: var(--blue-ink); text-decoration: none; }
.btn--primary:active { transform: scale(0.98); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { background: var(--surface); border-color: var(--ink-2); text-decoration: none; }
.btn--ghost:active { transform: scale(0.98); }

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 245, 242, 0.86);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 32px;
  min-height: 72px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 20px;
  letter-spacing: -0.02em; color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand .brand-mark {
  width: 10px; height: 10px; border-radius: var(--r-xs);
  background: var(--blue); display: inline-block;
  transform: translateY(-1px);
}
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: var(--ink-2); font-size: 16px; font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.header-cta { display: flex; gap: 12px; align-items: center; }
.header-cta .btn { padding: 12px 20px; min-height: 40px; font-size: 15px; }
.nav-toggle { display: none; }

/* ============================================================
   Hero — «доска бэклога»
   ============================================================ */
.hero { padding-top: 72px; padding-bottom: 96px; }
.hero__eyebrow { margin: 0 0 24px; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.board-col { display: flex; flex-direction: column; gap: 16px; }
.board-col__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.board-col__count {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-2);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 24px;
  transition: box-shadow 200ms var(--ease), transform 200ms var(--ease);
}
.card:hover { box-shadow: 0 2px 8px rgba(27, 27, 31, 0.06); }

.card--hero { padding: 32px; }
.card--hero .card__meta { margin: 0 0 16px; }

.hero__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 20px; color: var(--ink);
  text-wrap: balance;
}
.hero__title .accent { color: var(--blue); }
.hero__lead {
  font-size: 20px; line-height: 1.55; color: var(--ink-2);
  max-width: 40ch; margin: 0 0 32px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__note {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-2);
  margin: 16px 0 0;
}

/* Правая колонка героя — карточки «кому подойдёт» + статус */
.hero__aside { gap: 16px; }
.mini-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-s); padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: box-shadow 200ms var(--ease);
}
.mini-card:hover { box-shadow: 0 2px 8px rgba(27, 27, 31, 0.06); }
.mini-card__label { font-weight: 500; font-size: 16px; color: var(--ink); }
.mini-card__tag {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em;
  color: var(--ink-2); white-space: nowrap;
}

.hero__deep {
  background: var(--deep); border: none; border-radius: var(--r-s);
  padding: 24px; margin-top: 8px; color: #FFFFFF;
}
.hero__deep .hero__deep-num {
  font-family: var(--font-display); font-weight: 600; font-size: 40px;
  line-height: 1.05; letter-spacing: -0.02em; color: #FFFFFF; margin: 0 0 4px;
}
.hero__deep .hero__deep-cap {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted-on-deep); margin: 0;
}

/* ============================================================
   Секция фич — «карточки задач на доске»
   ============================================================ */
.features { padding-top: 96px; padding-bottom: 128px; }
.section-head { max-width: 62ch; margin: 0 0 48px; }
.section-head .meta { margin: 0 0 16px; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 40px;
  line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 16px; color: var(--ink);
  text-wrap: balance;
}
.section-head p {
  font-size: 20px; line-height: 1.55; color: var(--ink-2); margin: 0;
  max-width: 62ch;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-s); padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow 200ms var(--ease), transform 200ms var(--ease);
}
.feature:hover { box-shadow: 0 2px 8px rgba(27, 27, 31, 0.06); transform: translateY(-2px); }
.feature__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.feature__type {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-2);
}
.feature__points {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.feature h3 {
  font-family: var(--font-body); font-weight: 600; font-size: 20px;
  line-height: 1.3; margin: 0; color: var(--ink);
}
.feature p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }

/* Широкая карточка-акцент внутри сетки (доска: «эпик») */
.feature--wide { grid-column: span 2; }
.feature--accent {
  background: var(--deep); border: none; color: #FFFFFF;
}
.feature--accent .feature__meta { border-bottom-color: rgba(255, 255, 255, 0.14); }
.feature--accent .feature__type,
.feature--accent .feature__points { color: var(--muted-on-deep); }
.feature--accent h3 { color: #FFFFFF; }
.feature--accent p { color: var(--muted-on-deep); }

/* Полоса интеграций */
.integrations {
  margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
}
.integrations .meta { margin: 0; }
.integrations ul {
  display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0; padding: 0; list-style: none;
}
.integrations li {
  font-size: 15px; color: var(--ink-2); font-weight: 500;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-xs);
  background: var(--surface);
}

/* ============================================================
   Подвал (сжатый — для контекста скетча)
   ============================================================ */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--line);
  padding-top: 48px; padding-bottom: 48px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.site-footer .meta { margin: 0 0 8px; }
.footer-legal { font-size: 13px; color: var(--ink-2); line-height: 1.6; max-width: 62ch; }
.footer-contact { font-size: 16px; color: var(--ink); line-height: 1.7; }
.footer-contact a { color: var(--blue-ink); }

/* ============================================================
   Motion — один каскад на входе + reveal + reduced-motion
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.enter {
  opacity: 0;
  animation: rise 560ms var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 80ms);
}

.reveal {
  animation: rise linear both;
  animation-timeline: view();
  animation-range: entry 0% cover 28%;
}

@media (prefers-reduced-motion: reduce) {
  .enter, .reveal { animation: none; opacity: 1; transform: none; }
  * { scroll-behavior: auto; }
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature--wide { grid-column: span 2; }
}

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

@media (max-width: 640px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .header-cta .btn--ghost { display: none; }
  .hero { padding-top: 48px; padding-bottom: 64px; }
  .features { padding-top: 64px; padding-bottom: 72px; }
  .features__grid { grid-template-columns: minmax(0, 1fr); }
  .feature--wide { grid-column: span 1; }
  .hero__lead, .section-head p { font-size: 18px; }
  .section-head h2, .hero__deep .hero__deep-num { font-size: 32px; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .site-footer .wrap { flex-direction: column; }
}
