/* INCY quickstart — light forest theme.
   Cold near-white ground, ink text, single deep-green accent. One family (Onest), three weights. */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/onest-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: "Onest";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/onest-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/onest-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: "Onest";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/onest-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/onest-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/onest-latin-700-normal.woff2") format("woff2");
}

:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --ink: #14201a;
  --ink-soft: #3f544a;
  --accent: #176944;
  --accent-deep: #0f4d31;
  --wash: #e4efe8;
  --line: #d8e3dc;
  --radius: 14px;
  --radius-s: 10px;
  --container: 1120px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  /* On-dark layer: accent band sits on --accent-deep, footer on --ink */
  --on-dark: #fff;
  --band-text: #d9e8df;
  --band-line: #ffffff59;
  --footer-text: #cfdad3;
  --footer-faint: #93a49b;
  --footer-line: #ffffff1f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3 {
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
  hyphens: none;
  margin: 0 0 14px;
  font-weight: 700;
}

p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: 3px; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: #fff; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: top .15s ease-out;
}
.skip-link:focus-visible { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 2.75rem;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out), color .15s var(--ease-out), transform .1s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-deep); }
.btn-outline {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { min-height: 2.75rem; padding: 8px 18px; font-size: 15px; }

.text-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--accent) 40%, transparent);
}
.text-link:hover { text-decoration-color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.mark { width: 30px; height: 30px; flex: none; }
.brand-word {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;
}
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}
.main-nav a:hover { color: var(--ink); background: var(--wash); }
.main-nav a[aria-current="page"] { color: var(--accent); background: var(--wash); }

.mobile-nav { display: none; position: relative; }
.mobile-nav summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 500;
  background: var(--surface);
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav[open] summary { border-color: var(--accent); color: var(--accent); }
@keyframes menu-open { from { opacity: 0; transform: translateY(-6px); } }
.mobile-nav[open] nav { animation: menu-open .2s var(--ease-out); }
.mobile-nav nav {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  display: grid;
  gap: 2px;
  z-index: 40;
}
.mobile-nav nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}
.mobile-nav nav a:hover { background: var(--wash); }
.mobile-nav nav a[aria-current="page"] { color: var(--accent); }
.mobile-nav nav .btn { justify-content: center; margin-top: 8px; color: #fff; }

/* ---------- Hero (home) ---------- */
.hero { padding: 72px 0 64px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 48px;
  align-items: center;
}
.display {
  font-size: clamp(2.05rem, 4.4vw, 3.25rem);
  margin-bottom: 18px;
}
.display .soft { color: var(--ink-soft); font-weight: 500; }
.lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 60ch;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.hero-art { display: flex; justify-content: center; }
.route-art { width: min(100%, 420px); height: auto; }
.ra-device { fill: var(--surface); stroke: var(--ink-soft); stroke-width: 2; }
.ra-detail { fill: var(--line); }
.ra-path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.ra-path-faint { stroke: var(--ink-soft); opacity: .25; stroke-width: 1.5; }
.ra-node { fill: var(--accent); }
.ra-ring { fill: none; stroke: var(--accent); stroke-width: 2; }

/* Signature moment: the connection route draws itself once on load.
   Base states above are the finished picture — animations only replay the entrance,
   so no-JS, no-animation and reduced-motion all land on the same visible art. */
@keyframes ra-draw { from { stroke-dashoffset: 1; } }
@keyframes ra-pop { from { opacity: 0; transform: scale(.4); } }
@keyframes ra-fade { from { opacity: 0; } }
.route-art .ra-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: ra-draw .9s var(--ease-expo) .15s backwards;
}
.route-art .ra-path-faint { animation-duration: 1.1s; animation-delay: .3s; }
.route-art .ra-node,
.route-art .ra-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: ra-pop .45s var(--ease-out) backwards;
}
.route-art .ra-node:nth-of-type(1) { animation-delay: .38s; }
.route-art .ra-node:nth-of-type(2) { animation-delay: .52s; }
.route-art .ra-node:nth-of-type(3) { animation-delay: .68s; }
.route-art .ra-ring { animation-delay: .9s; }
.route-art .ra-ring + .ra-node { animation: ra-fade .35s var(--ease-out) 1s backwards; }
.route-art .ra-device { animation: ra-fade .5s var(--ease-out) backwards; }

/* ---------- Page hero (spokes) ---------- */
.page-hero { padding: 40px 0 56px; }
.breadcrumbs { margin-bottom: 26px; font-size: 15px; }
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--ink-soft);
}
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs li + li::before { content: "→"; margin-right: 6px; color: var(--line); }
.breadcrumbs [aria-current="page"] { color: var(--ink); }
.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: start;
}
.page-hero h1 { font-size: clamp(1.85rem, 3.6vw, 2.7rem); }
.page-lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 62ch;
}
.result-chip {
  display: grid;
  gap: 2px;
  margin: 6px 0 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 200px;
  max-width: 260px;
}
.result-chip span { font-size: 13px; color: var(--ink-soft); }
.result-chip strong { font-size: 16px; line-height: 1.35; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section--tint { background: var(--wash); border-top-color: transparent; }
.section-heading { max-width: 720px; margin-bottom: 30px; }
.section-heading h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); }
.section-lead { color: var(--ink-soft); font-size: 17px; }
.section-note { color: var(--ink-soft); font-size: 16px; max-width: 68ch; }

/* ---------- Platform grid (home) ---------- */
.platform-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* 7 плиток: фиксированные 4 колонки дают ровные ряды 4+3 (auto-fit давал 6+1 с сиротой) */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.platform-tile {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  min-height: 2.75rem;
  transition: border-color .15s ease-out, transform .15s ease-out;
}
.platform-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.platform-tile strong { font-size: 17px; }
.platform-tile span { font-size: 14px; color: var(--ink-soft); }

/* ---------- Steps (ledger) ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 10px;
}
.steps li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--accent);
  font-weight: 700;
  font-size: 17px;
}
.step-copy h3 { font-size: 18px; margin-bottom: 6px; }
.step-copy p { color: var(--ink-soft); font-size: 16px; }
.step-result {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  background: var(--wash);
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
  margin-top: 4px;
}

/* ---------- Protocols row ---------- */
.proto-row {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.9;
  max-width: 56ch;
}
.proto-row .sep { color: var(--accent); }

/* ---------- Source list (download) ---------- */
.source-list { list-style: none; margin: 0; padding: 0; }
.source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}
.source-row:first-child { border-top: 1px solid var(--line); }
.source-name { display: grid; gap: 2px; min-width: 0; }
.source-name strong { font-size: 17px; }
.source-name span { font-size: 15px; color: var(--ink-soft); }
.source-row .btn { flex: none; }

/* ---------- Card grids ---------- */
.os-grid, .way-grid, .task-grid, .contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.os-card, .way-card, .task-card, .contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.os-card h3, .way-card h3, .task-card h3, .contact-card h3 { font-size: 18px; margin-bottom: 4px; }
.os-card p, .way-card p, .task-card p, .contact-card p {
  color: var(--ink-soft);
  font-size: 16px;
  margin-bottom: 14px;
}
.os-card .btn, .contact-card .btn { margin-top: auto; align-self: flex-start; }
.task-num {
  font-weight: 700;
  color: var(--accent);
  font-size: 15px;
  margin-bottom: 8px;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.split article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.split h3 { font-size: 18px; }
.split p { color: var(--ink-soft); font-size: 16px; }

/* ---------- Generated art (icons, covers) ---------- */
.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  align-self: flex-start;
}
.blog-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-s);
  background: var(--wash);
  margin-bottom: 4px;
}
.post-cover {
  width: 100%;
  height: auto;
  max-width: 400px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  justify-self: end;
}

/* ---------- Blog ---------- */
.post-meta { font-size: 14px; color: var(--ink-soft); margin: 4px 0 0; }
.post-body { max-width: 70ch; }
.post-body h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin: 34px 0 12px; }
.post-body h2:first-child { margin-top: 0; }
.post-body p { color: var(--ink-soft); }
.post-related { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s var(--ease-out), transform .15s var(--ease-out);
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.blog-card h3 { font-size: 18px; margin: 0; }
.blog-card p { color: var(--ink-soft); font-size: 15px; margin: 0; }
.blog-card .post-meta { margin-top: auto; padding-top: 8px; }
.article-links {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 28px;
}
.article-links a { font-weight: 500; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  font-weight: 500;
  font-size: 17px;
  min-height: 2.75rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-weight: 500;
  transition: transform .15s ease-out;
}
.faq details[open] summary::after { content: "−"; transform: rotate(180deg); }
.faq summary:hover { color: var(--accent); }
.details-body { padding: 0 4px 18px; color: var(--ink-soft); max-width: 70ch; }
@keyframes details-open { from { opacity: 0; transform: translateY(-4px); } }
.faq details[open] .details-body { animation: details-open .22s var(--ease-out); }

/* ---------- Action band ---------- */
.action-band {
  background: var(--accent-deep);
  color: var(--on-dark);
  padding: 56px 0;
}
.action-band h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); color: var(--on-dark); }
.action-band p { color: var(--band-text); max-width: 56ch; }
.action-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}
.action-buttons { display: flex; flex-wrap: wrap; gap: 12px; flex: none; }
.action-band .btn-solid { background: var(--on-dark); color: var(--accent-deep); }
.action-band .btn-solid:hover { background: var(--wash); }
.action-band .btn-outline { background: transparent; border-color: var(--band-line); color: var(--on-dark); }
.action-band .btn-outline:hover { border-color: var(--on-dark); color: var(--on-dark); }

/* ---------- Access CTA ---------- */
.access-cta .cta-row { margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--footer-text);
  padding: 56px 0 32px;
}
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: var(--on-dark); text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-dark);
  margin-bottom: 14px;
}
.footer-brand .brand-word { font-size: 18px; }
.site-footer .mark rect:first-child { fill: var(--accent); }
.footer-note { font-size: 15px; max-width: 40ch; }
.footer-resources { margin: 14px 0 0; font-size: 14px; color: var(--footer-faint); }
.footer-resources a { color: var(--footer-text); text-decoration: none; }
.footer-resources a:hover { color: var(--on-dark); text-decoration: underline; }
.footer-links { display: grid; gap: 8px; align-content: start; font-size: 15px; }
.footer-title { color: var(--on-dark); font-weight: 700; margin: 0 0 4px; font-size: 15px; }
.footer-fine {
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--footer-line);
  font-size: 14px;
  color: var(--footer-faint);
}

/* ---------- 404 ---------- */
.error-page { padding: 96px 0 120px; text-align: left; }
.error-page h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.error-page p { color: var(--ink-soft); max-width: 56ch; }
.error-page .cta-row { margin-top: 24px; }

/* ---------- Reveal (progressive enhancement; content visible without JS) ---------- */
.reveal { opacity: 1; transform: none; }
.js-ready .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}
.js-ready .reveal.d1 { transition-delay: .08s; }
.js-ready .reveal.d2 { transition-delay: .16s; }
.js-ready .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-ready .reveal { opacity: 1; transform: none; }
  * {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { padding: 52px 0 48px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero-art { order: -1; }
  .route-art { width: min(100%, 320px); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
}

@media (max-width: 860px) {
  .main-nav, .header-cta { display: none; }
  .mobile-nav { display: block; }
  .os-grid, .way-grid, .task-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .page-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .result-chip { max-width: none; justify-self: start; }
  .post-cover { max-width: 100%; justify-self: stretch; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 44px 0; }
  .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .blog-list, .article-links { grid-template-columns: minmax(0, 1fr); }
  .steps li { grid-template-columns: 40px minmax(0, 1fr); padding: 18px; }
  .step-num { width: 36px; height: 36px; font-size: 16px; }
  .step-result { grid-column: 2; justify-self: start; margin-top: 0; }
  .source-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .action-band-inner { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 520px) {
  .container { padding: 0 18px; }
  .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-row .btn { flex: 1 1 auto; }
  .lede { font-size: 17px; }
}
