/* Визуальный язык RR Team: чистый тёмный фон, спокойная типографика, системный sans-шрифт без внешних CDN. */
:root {
  color-scheme: dark;
  --bg: #000000;
  --fg: #ecebe6;
  --mute: rgba(236, 235, 230, .74);
  --dim: rgba(236, 235, 230, .56);
  --hair: rgba(236, 235, 230, .14);
  --card: #1b1c21;
  --card-hover: #24262d;
  --edge: #32353f;
  --accent: #8fdbff;
  --r-ctl: 10px;
  --r-card: 18px;
  --hdr-h: 56px;
  --col: min(1040px, calc(100vw - 48px));
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--hdr-h) + 24px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration-color: rgba(236, 235, 230, .34);
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-color: var(--fg);
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 40;
  padding: 10px 14px;
  border-radius: var(--r-ctl);
  background: var(--fg);
  color: #000;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 8px;
}

/* ---------- шапка */
.hdr {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--hdr-h);
  background: rgba(0, 0, 0, .86);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--hair);
}

.hdr-in {
  width: var(--col);
  min-height: var(--hdr-h);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
  text-decoration: none;
  border-radius: var(--r-ctl);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--fg);
}

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 1px;
  background: var(--fg);
}

.langs {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.langs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dim);
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
}

.langs a:hover {
  color: var(--fg);
  background: rgba(236, 235, 230, .06);
}

.langs a[aria-current="page"] {
  color: var(--fg);
  border-color: var(--edge);
  background: var(--card);
}

/* ---------- основная колонка */
.page {
  width: var(--col);
  margin: 0 auto;
  padding: 56px 0 0;
  flex: 1;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 650;
  letter-spacing: -.015em;
  text-wrap: balance;
}

h2 {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 28px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.01em;
}

h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
}

.lede {
  margin: 18px 0 0;
  max-width: 60ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--mute);
  text-wrap: pretty;
}

.hero {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--hair);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--edge);
  background: var(--card);
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover {
  background: var(--card-hover);
  border-color: rgba(236, 235, 230, .4);
}

.btn-primary {
  background: var(--fg);
  border-color: var(--fg);
  color: #000;
}

.btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
}

/* ---------- секции и карточки */
.section {
  margin-top: 56px;
}

.section-intro {
  margin: 10px 0 0;
  max-width: 64ch;
  font-size: 16px;
  color: var(--mute);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
}

.card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.card-summary {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--mute);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--hair);
}

.facts div {
  min-width: 0;
}

.facts dt {
  font-size: 12px;
  color: var(--dim);
}

.facts dd {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--fg);
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: auto;
  padding-top: 22px;
  font-size: 14px;
  font-weight: 500;
}

.card-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

.hub-card {
  margin-top: 24px;
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
}

.hub-card p {
  margin: 0;
  max-width: 66ch;
  font-size: 16px;
  color: var(--mute);
}

.chip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.chip-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(236, 235, 230, .04);
  font-size: 14px;
  text-decoration: none;
}

.chip-links a:hover {
  border-color: var(--fg);
  background: rgba(236, 235, 230, .09);
}

.contact-line {
  margin: 14px 0 0;
  font-size: 17px;
}

/* ---------- страница лицензии и атрибуций */
.crumb {
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--dim);
}

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

.crumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--dim);
}

.crumb a {
  text-decoration: none;
  color: var(--mute);
}

.crumb a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.license-note {
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--mute);
}

.toc {
  margin-top: 28px;
  padding: 18px 22px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
}

.toc-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--mute);
}

.toc a:hover {
  color: var(--fg);
}

.license-doc {
  margin-top: 20px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
}

.license-doc h2 {
  font-size: 20px;
  letter-spacing: .04em;
}

.license-doc p {
  margin: 14px 0 0;
  max-width: 72ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--mute);
}

.license-doc ul {
  margin: 10px 0 0;
  padding-left: 22px;
  max-width: 72ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--mute);
}

.license-doc li + li {
  margin-top: 6px;
}

.credit-group {
  margin-top: 28px;
  padding: 24px 26px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
}

.credit-group p {
  margin: 12px 0 0;
  max-width: 72ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--mute);
}

.credit-list {
  margin: 14px 0 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg);
}

.credit-list li + li {
  margin-top: 8px;
}

.credit-meta {
  color: var(--mute);
}

.contact-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 16px;
}

.contact-list strong {
  color: var(--dim);
  font-weight: 500;
  margin-right: 8px;
}

/* ---------- 404 */
.notfound {
  padding: 40px 0 24px;
}

.notfound p {
  margin: 14px 0 0;
  font-size: 17px;
  color: var(--mute);
}

/* ---------- подвал */
.ft {
  width: var(--col);
  margin: 96px auto 0;
  padding: 32px 0 44px;
  border-top: 1px solid var(--hair);
  font-size: 13px;
  line-height: 1.55;
  color: var(--dim);
}

.ft-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.ft-copy {
  margin: 0;
  color: var(--fg);
  font-weight: 500;
}

.ft-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ft-links a {
  color: var(--mute);
  text-decoration: none;
}

.ft-links a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.ft-notes {
  margin-top: 18px;
  max-width: 74ch;
}

.ft-notes p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--dim);
}

@media (max-width: 760px) {
  :root {
    --col: calc(100vw - 32px);
  }

  .hdr-in {
    gap: 12px;
  }

  .nav a {
    padding: 0 8px;
    font-size: 13px;
  }

  .page {
    padding-top: 36px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .card,
  .hub-card,
  .license-doc,
  .credit-group {
    padding: 20px;
  }

  .ft {
    margin-top: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
