/* ============================================================
   Devlog OSNOVA
   Самостоятельный стиль — по тому же принципу, что blog/blog.css:
   базовые токены и утилиты объявляются заново, а не импортируются.
   ============================================================ */

:root {
  --bg: #F6F5F0;
  --bg-2: #EFEEE8;
  --ink: #0A0F0B;
  --ink-2: #4B5550;
  --line: rgba(10,15,11,.08);
  --lime: #C6F24E;
  --forest: #0D2A1C;
  --forest-2: #143F2A;
}
html { scroll-behavior: smooth; }

body {
  font-family: 'Satoshi', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01","cv11";
}
.display { font-family: 'Cabinet Grotesk','Satoshi',sans-serif; letter-spacing: -0.035em; line-height: 1.02; }
.mono { font-family: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 24px 48px -28px rgba(10,20,15,.10);
}
.pill { background: #fff; border:1px solid var(--line); box-shadow: 0 10px 28px -18px rgba(10,20,15,.25); }

.btn-dark {
  background: #0A0F0B; color:#fff; border-radius: 999px;
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s;
  box-shadow: 0 10px 24px -10px rgba(10,15,11,.45);
}
.btn-dark:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -10px rgba(10,15,11,.55); }
.btn-dark:active { transform: translateY(1px) scale(.985); }
.btn-lime {
  background: var(--lime); color:#0A0F0B; border-radius: 999px;
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 24px -10px rgba(130,170,30,.55);
}
.btn-lime:hover { transform: translateY(-1px); }
.btn-lime:active { transform: translateY(1px) scale(.985); }

.link-hover { position: relative; }
.link-hover::after {
  content:""; position:absolute; left:0; right:0; bottom:-3px; height:1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.link-hover:hover::after { transform: scaleX(1); }

.noise {
  position: absolute; inset:0; pointer-events:none; opacity:.08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* ============================================================
   Devlog-специфичное
   ============================================================ */

[hidden] { display: none !important; }

/* Панель фильтра существует только при работающем JS.
   Без него фильтровать нечем, а мёртвые кнопки показывать нельзя. */
.dl-filterbar { display: none; }
.has-js .dl-filterbar { display: block; }

/* --- ритм ленты --- */
.dl-month { scroll-margin-top: 120px; }   /* якорь не уезжает под плавающее меню */
.dl-month + .dl-month {
  margin-top: 3.5rem; padding-top: 3.5rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 1024px) {
  .dl-month + .dl-month { margin-top: 5.5rem; padding-top: 5.5rem; }
}

/* --- кнопки фильтра --- */
.dl-filters {
  display: flex; gap: .5rem; align-items: center;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: .35rem .25rem; margin: -.35rem -.25rem;
}
.dl-filters::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .dl-filters { flex-wrap: wrap; overflow: visible; } }

.dl-chip {
  display: inline-flex; align-items: center; gap: .45rem; flex: 0 0 auto;
  padding: .5rem .95rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink-2); font-size: 13.5px; font-weight: 500; line-height: 1;
  white-space: nowrap; cursor: pointer;
  transition: background-color .25s cubic-bezier(.16,1,.3,1), color .25s, border-color .25s, transform .2s;
}
.dl-chip svg { width: 14px; height: 14px; opacity: .5; transition: opacity .25s, color .25s; }
.dl-chip:hover { border-color: rgba(10,15,11,.24); color: var(--ink); }
.dl-chip:active { transform: scale(.97); }
.dl-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dl-chip[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: #fff;
  box-shadow: 0 10px 24px -14px rgba(10,15,11,.55);
}
.dl-chip[aria-pressed="true"] svg { opacity: 1; color: var(--lime); }

/* --- постоянная ссылка на месяц --- */
.dl-anchor {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--ink-2); opacity: .45;
  transition: opacity .3s, color .3s;
}
.dl-anchor:hover { opacity: 1; color: var(--ink); }
.dl-anchor:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; opacity: 1; }

/* --- линия времени --- */
.dl-rail { position: relative; padding-left: 24px; }
@media (min-width: 768px) { .dl-rail { padding-left: 28px; } }
.dl-rail::before {
  content: ""; position: absolute; left: 7px; top: 10px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg,
    rgba(10,15,11,.28) 0, var(--line) 10%, var(--line) 84%, rgba(10,15,11,0) 100%);
}
.dl-rail::after {
  content: ""; position: absolute; left: 3px; top: 6px;
  width: 9px; height: 9px; border-radius: 999px;
  background: var(--ink); box-shadow: 0 0 0 4px var(--bg);
}
@media (min-width: 768px) {
  .dl-rail::before { left: 8px; }
  .dl-rail::after  { left: 4px; }
}

/* --- группа категории --- */
.dl-group + .dl-group { margin-top: 2.25rem; }
.dl-group-head {
  display: flex; align-items: center; gap: .6rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .18em;
}
.dl-group-head svg { width: 14px; height: 14px; flex: none; color: var(--ink); opacity: .65; }
.dl-group-head .dl-count { margin-left: auto; opacity: .5; letter-spacing: .1em; }

/* --- рядовое обновление --- */
.dl-item {
  position: relative;
  padding: 1.35rem 0 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.dl-group .dl-item:last-child { border-bottom: 0; }
.dl-item::before {
  content: ""; position: absolute; left: -21px; top: 1.85rem;
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--bg); border: 1px solid rgba(10,15,11,.26);
  box-shadow: 0 0 0 3px var(--bg);
  transition: background-color .3s, transform .3s cubic-bezier(.16,1,.3,1);
}
@media (min-width: 768px) { .dl-item::before { left: -24px; } }
.dl-item:hover::before { background: var(--lime); transform: scale(1.22); }

/* --- главный релиз месяца --- */
.dl-featured {
  position: relative;
  margin: 0 0 2.5rem -24px;
  border-radius: 28px; overflow: hidden;
  color: #fff;
  background: linear-gradient(158deg, var(--forest) 0%, var(--forest-2) 68%, #0B2418 100%);
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 32px 60px -34px rgba(10,32,20,.55);
}
@media (min-width: 768px)  { .dl-featured { margin-left: -28px; border-radius: 32px; } }
@media (min-width: 1024px) { .dl-featured { margin-right: -2rem; } }

.dl-featured-glow {
  position: absolute; top: -180px; right: -120px; width: 440px; height: 440px;
  border-radius: 999px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(198,242,78,.28), transparent);
}
.dl-featured-label {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .8rem .4rem .65rem; border-radius: 999px;
  background: var(--lime); color: var(--ink);
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em;
}
.dl-featured-label svg { width: 13px; height: 13px; }

/* Слот 16:9. Заглушка лежит снизу; <img> удаляет себя, если файла нет,
   поэтому битой иконки не появляется. */
.dl-shot {
  position: relative; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden;
  background-color: rgba(255,255,255,.05);
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 18px 18px;
  border: 1px dashed rgba(255,255,255,.16);
}
.dl-shot-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .6rem;
  color: rgba(255,255,255,.32); text-align: center; padding: 1rem;
}
.dl-shot-empty svg { width: 26px; height: 26px; }
.dl-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.dl-shot.is-loaded { border-style: solid; border-color: rgba(255,255,255,.10); background-image: none; }

/* --- ничего не найдено --- */
.dl-empty { display: flex; flex-direction: column; align-items: flex-start; gap: .85rem; padding: 3rem 0; }

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