/* Стили главной и страницы новости лендинга Нейрокаст (C-LANDING-HOME). Только светлая тема.
   Раскладка, цвета и типографика — по макету v1 «Семья». Активы ссылаются плоско, без внешних CDN. */

/* Golos Text — вариативный вес, кириллица и латиница отдельными файлами рядом со страницей */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url('golos-text-cyrillic.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url('golos-text-latin.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface-2: #f1f5f9;
  --ink: #020817;
  --ink-2: #5a687c;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --focus: #1d4ed8;

  --studio: #b45309;    --studio-fill: #ffefe0;    --studio-text: #7d3a05;
  --commentor: #238995; --commentor-fill: #e0f4f7; --commentor-text: #16606b;
  --tiflo: #4f46e5;     --tiflo-fill: #e0e7ff;     --tiflo-text: #3730a3;
  --platform: #64748b;  --platform-fill: #f1f5f9;  --platform-text: #334155;

  --fs-xs: 13px;
  --fs-s: 15px;
  --fs-m: 17px;
  --fs-xl: 28px;
  --rail-w: 240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--fs-m);
  line-height: 1.55;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Цвета продукта: точка, заливка карточки, цвет текста */
[data-p="studio"] { --c: var(--studio); --cf: var(--studio-fill); --ct: var(--studio-text); }
[data-p="commentor"] { --c: var(--commentor); --cf: var(--commentor-fill); --ct: var(--commentor-text); }
[data-p="tiflo"] { --c: var(--tiflo); --cf: var(--tiflo-fill); --ct: var(--tiflo-text); }
[data-p="platform"] { --c: var(--platform); --cf: var(--platform-fill); --ct: var(--platform-text); }

/* Каркас: рельс слева, содержимое справа */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }

.rail {
  position: sticky; top: 0; height: 100vh;
  padding: 28px 20px 24px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 24px;
  background: var(--bg);
}
.rail-head { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; }
.menu-btn {
  display: none; width: 40px; height: 40px; padding: 0;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); cursor: pointer;
}
.menu-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.menu-btn .ic-close { display: none; }
.menu-btn[aria-expanded="true"] .ic-open { display: none; }
.menu-btn[aria-expanded="true"] .ic-close { display: block; }

.rail-menu { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 0; overflow-y: auto; }
.rail-menu nav { display: flex; flex-direction: column; gap: 2px; }
.rail-item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px;
  border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer;
  text-decoration: none; font-size: var(--fs-s); color: var(--ink-2);
}
.rail-item:hover { background: var(--surface-2); color: var(--ink); }
.rail-item[aria-current="page"] { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.rail-item[data-p]::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }

/* Содержимое */
.main { padding: 48px 56px 64px; max-width: 1180px; min-width: 0; }
.hero h1 { font-size: 48px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.05; max-width: 20ch; }
.hero p { margin-top: 16px; font-size: 19px; color: var(--ink-2); max-width: 62ch; }
.hero .btn { margin-top: 24px; }
.block { margin-top: 64px; }
.block h2 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.015em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--bg); font-size: var(--fs-s); font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn-ink { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-ink:hover { background: var(--ink); opacity: .88; }

.cards { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; text-decoration: none; min-width: 0; }
.card.prod { background: var(--cf); border-color: color-mix(in srgb, var(--c) 35%, transparent); transition: transform .15s ease, box-shadow .15s ease; }
.card.prod:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--c) 60%, transparent); }
.card.prod h3 { font-size: 24px; font-weight: 750; color: var(--ct); letter-spacing: -0.02em; }
.card.prod p { color: var(--ink-2); font-size: var(--fs-s); }
.card.prod .go { margin-top: auto; padding-top: 4px; font-size: var(--fs-s); font-weight: 600; color: var(--ct); }

/* Новости */
.news-card { transition: border-color .15s ease; }
.news-card:hover { border-color: var(--line-2); }
.cover { aspect-ratio: 16 / 10; border-radius: 8px; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover svg { width: 36px; height: 36px; fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.news-card time { font-size: var(--fs-xs); color: var(--ink-2); }
.news-card h3 { font-size: var(--fs-m); font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }

/* Дневник разработки */
.devlog { margin-top: 20px; border-top: 1px solid var(--line); }
.devlog li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-s); overflow-wrap: anywhere; }
.devlog time { color: var(--ink-2); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.devlog .tag { display: inline-flex; vertical-align: baseline; align-items: center; gap: 7px; font-size: var(--fs-xs); font-weight: 600; color: var(--ct); white-space: nowrap; }
.devlog .tag::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.devlog-more { margin-top: 16px; }

/* Контакты */
.contacts { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contacts a { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; text-decoration: none; min-width: 0; }
.contacts a:hover { border-color: var(--line-2); background: var(--surface-2); }
.contacts small { display: block; font-size: var(--fs-xs); color: var(--ink-2); }
.contacts b { font-weight: 600; overflow-wrap: anywhere; }
.foot { margin-top: 64px; font-size: var(--fs-xs); color: var(--ink-2); }

/* Страница новости */
.article { max-width: 720px; }
.article .cover { aspect-ratio: 16 / 9; border-radius: 12px; }
.article time { display: block; margin-top: 24px; font-size: var(--fs-s); color: var(--ink-2); }
.article h1 { margin-top: 8px; font-size: 40px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.12; overflow-wrap: anywhere; }
.article-body { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; font-size: 18px; line-height: 1.65; overflow-wrap: anywhere; }
.article-actions { margin-top: 40px; }
.article-status { font-size: 19px; color: var(--ink-2); }
.article-status + .article-actions { margin-top: 24px; }

/* Окна */
.dlg {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 28px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(2, 8, 23, .35);
}
.dlg::backdrop { background: rgba(2, 8, 23, .45); }
.dlg h2 { font-size: 24px; font-weight: 750; letter-spacing: -0.02em; padding-right: 40px; }
.dlg .lead { margin-top: 8px; font-size: var(--fs-s); color: var(--ink-2); }
.dlg-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: none; color: var(--ink-2); cursor: pointer;
}
.dlg-close:hover { background: var(--surface-2); color: var(--ink); }
.dlg-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.dlg-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.dlg-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; min-width: 0; }
.dlg-link:hover { border-color: var(--line-2); background: var(--surface-2); }
.dlg-link .ico { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); }
.dlg-link .ico svg { width: 20px; height: 20px; }
.dlg-link .ico .stroke { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dlg-link .ico .tg { fill: #1b7aa8; }
.dlg-link small { display: block; font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.3; }
.dlg-link b { font-weight: 600; overflow-wrap: anywhere; }
.dlg-link[data-p] { background: var(--cf); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.dlg-link[data-p] b { color: var(--ct); font-size: 18px; font-weight: 700; }
.dlg-link[data-p]::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

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

/* До 900 px рельс — верхняя панель со знаком и кнопкой меню */
@media (max-width: 900px) {
  .shell { display: block; }
  .rail { height: auto; z-index: 20; padding: 10px 16px; gap: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .menu-btn { display: inline-flex; }
  .rail-menu { display: none; padding: 12px 0 8px; overflow: visible; }
  .rail[data-open="true"] .rail-menu { display: flex; }
  .rail[data-open="true"] { max-height: 100vh; overflow-y: auto; }
  .main { padding: 32px 16px 48px; }
  .hero h1 { font-size: 40px; }
  .hero p { font-size: var(--fs-m); }
  .block { margin-top: 48px; }
  .cards, .contacts { grid-template-columns: 1fr; }
  .article h1 { font-size: 32px; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 34px; }
  .block h2 { font-size: 24px; }
  .dlg { padding: 22px 18px; }
}
