/* kitsfz.ru — базовая дизайн-система.
   Палитра: технический синий, нейтральная бумага, сигнальный янтарь.
   Внешних ресурсов нет: шрифты системные, иконки — SVG в разметке. */

:root {
  --ink: #131a20;
  --ink-soft: #33424e;
  --muted: #5d6b77;
  --line: #d8dfe4;
  --line-strong: #b7c3cc;
  --paper: #ffffff;
  --bg: #f4f6f8;
  --navy: #0f2233;
  --navy-soft: #1b3448;
  --steel: #24506f;
  --accent: #b26a00;
  --accent-bright: #f0a53a;
  --ok: #1f6b45;
  --warn: #8a4b00;

  --radius: 3px;
  --wrap: 1140px;
  --prose: 74ch;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SF Mono", ui-monospace, monospace;
  --shadow: 0 1px 2px rgba(15, 34, 51, 0.06), 0 8px 24px rgba(15, 34, 51, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

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

a {
  color: var(--steel);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--navy);
}

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

.site-header :focus-visible,
.hero :focus-visible,
.cta-panel :focus-visible,
.site-footer :focus-visible {
  outline-color: #ffc46b;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}

.skip:focus {
  left: 8px;
  top: 8px;
}

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

/* ---------- шапка ---------- */

.site-header {
  background: var(--navy);
  color: #eaf1f6;
  border-bottom: 3px solid var(--steel);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-size: 18px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.brand small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9fb4c4;
}

.nav {
  margin-left: auto;
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  display: block;
  padding: 8px 11px;
  color: #cfdde7;
  text-decoration: none;
  font-size: 15px;
  border-radius: var(--radius);
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--navy-soft);
  color: #fff;
}

/* ---------- главный блок ---------- */

.hero {
  background:
    linear-gradient(180deg, rgba(15, 34, 51, 0.96), rgba(15, 34, 51, 0.99)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 56px);
  color: #eef4f8;
  padding: 64px 0 56px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 14px 0 18px;
  max-width: 22ch;
  color: #fff;
}

.hero p {
  font-size: 18px;
  max-width: 62ch;
  color: #c7d7e3;
  margin: 0 0 26px;
}

.kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

/* На тёмном фоне янтарный читается, на светлом — нет */
.hero .kicker,
.cta-panel .kicker,
.site-footer .kicker {
  color: var(--accent-bright);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-bright);
  color: #23180a;
}

.btn-primary:hover {
  background: #ffb954;
  color: #23180a;
}

.btn-ghost {
  border-color: #4a6a83;
  color: #e8f1f7;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hero-meta {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  font-size: 14px;
  color: #b6c8d6;
}

.hero-meta strong {
  display: block;
  color: #fff;
  font-size: 15px;
  margin-bottom: 2px;
}

/* ---------- содержимое ---------- */

main {
  display: block;
  padding: 0 0 64px;
}

.section {
  padding: 52px 0 0;
}

.section-head {
  max-width: 68ch;
  margin-bottom: 26px;
}

.section h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 8px 0 10px;
}

.section p.lead {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0;
}

.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 0;
}

.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: var(--line-strong);
}

.crumbs a {
  color: var(--muted);
}

.page-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 28px 0 34px;
}

.page-head h1 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 10px 0 12px;
  max-width: 28ch;
}

.page-head p {
  max-width: 66ch;
  color: var(--ink-soft);
  margin: 0;
  font-size: 17px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--steel);
  border-radius: var(--radius);
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}

.card h3 a {
  text-decoration: none;
  color: var(--navy);
}

.card h3 a:hover {
  text-decoration: underline;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15.5px;
}

.card .tags {
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.prose {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 34px 36px;
  max-width: 100%;
}

.prose > * {
  max-width: var(--prose);
}

.prose h2 {
  font-size: 26px;
  line-height: 1.25;
  margin: 34px 0 12px;
  letter-spacing: -0.015em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 20px;
  margin: 26px 0 8px;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li {
  margin: 6px 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 22px;
  font-size: 15.5px;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--bg);
  font-weight: 650;
  color: var(--ink);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1px 5px;
}

.callout {
  border-left: 4px solid var(--accent);
  background: #fdf6ea;
  padding: 14px 18px;
  margin: 22px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout strong {
  color: var(--warn);
}

.callout--note {
  border-left-color: var(--steel);
  background: #eef4f8;
}

.callout--note strong {
  color: var(--navy);
}

.toc {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 24px;
}

.toc h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 10px;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
  font-size: 15.5px;
}

@media (max-width: 720px) {
  .toc ol {
    columns: 1;
  }
}

.cta-panel {
  background: var(--navy);
  color: #e9f1f7;
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-top: 30px;
}

.cta-panel h2 {
  color: #fff;
  margin: 6px 0 10px;
  font-size: 24px;
}

.cta-panel p {
  color: #c2d3e0;
  max-width: 60ch;
  margin: 0 0 18px;
}

.grid-two {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .grid-two {
    grid-template-columns: 1fr;
  }
}

.aside-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.aside-box h2 {
  font-size: 17px;
  margin: 0 0 10px;
}

.aside-box ul {
  margin: 0;
  padding-left: 18px;
  font-size: 15.5px;
  color: var(--ink-soft);
}

.aside-box li {
  margin: 7px 0;
}

.updated {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 18px;
}

.actions {
  margin-top: 24px;
}

/* ---------- подвал ---------- */

.site-footer {
  background: var(--navy);
  color: #b9cbd9;
  padding: 42px 0 32px;
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer h2,
.site-footer h3 {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 7px 0;
}

.site-footer a {
  color: #cfdde7;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 13.5px;
  color: #93a9ba;
}

.disclaimer {
  max-width: 72ch;
  color: #93a9ba;
  font-size: 13.5px;
  margin-top: 14px;
}

/* ---------- изображения ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.hero-picture {
  margin: 0;
}

.hero-picture img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.lead-figure {
  max-width: var(--wrap);
  margin: 22px auto 0;
  padding: 0 24px;
}

.lead-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 3px;
  display: block;
  background: var(--paper);
}

.lead-figure figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

.card-thumb {
  margin: -20px -20px 14px;
  overflow: hidden;
  border-radius: 2px 2px 0 0;
  background: var(--bg);
}

.card-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-thumb img {
  transform: scale(1.03);
}

figure.fig {
  margin: 26px 0;
  max-width: none;
}

figure.fig img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  display: block;
}

figure.fig figcaption {
  margin-top: 9px;
  font-size: 14px;
  color: var(--muted);
  max-width: 74ch;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery-grid figure {
  margin: 0;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.gallery-grid figcaption {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 7px;
}

@media print {
  .hero-picture,
  .lead-figure,
  .card-thumb,
  .gallery-grid {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .cta-panel {
    display: none;
  }

  body {
    background: #fff;
    font-size: 12pt;
  }

  .prose {
    border: 0;
    padding: 0;
  }
}
