/* obnovi.site — индекс блога /blog/. Оболочка студии в языке облика «Солидный» (home/v1):
   бумага, тушь, волосяные линейки, моно-подписи. Карточка статьи несёт её собственный
   мир — гравюру и антикву «Атласа помех». Модуль 8px. Сборка: home/blog/README.md. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-lat.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plexmono-500-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plexmono-500-lat.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url("../fonts/cormorant-it-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url("../fonts/cormorant-it-lat.woff2") format("woff2");
  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;
}
/* рукописный шрифт статьи «Как создать сайт с помощью ИИ» (мир «Наклейки»), OFL, копия из статьи */
@font-face {
  font-family: "Amatic SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/amatic-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Amatic SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/amatic-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
}
:root {
  --paper: #F6F5F0;
  --sheet: #FFFFFF;
  --ink: #0F172A;
  --graphite: #4A5568;
  --pencil: #78869A;
  --rule: #DAD8CF;
  --leaf: #2E9E4F;
  --leaf-ink: #1E7A3B;
  --leaf-dark: #45B96A;
  --night-line: #2A3448;
  --night-text: #AEB6C4;
  /* мир статьи «Атлас помех» */
  --vellum: #EFE3CD;
  --sepia: #3A2A1E;
  --cinnabar: #983823;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --side: 40px;
  --font: 'Manrope', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.56 var(--font);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1, h2, h3, p, ol, ul, dl, dd {
  margin: 0;
}

ol, ul {
  padding: 0;
  list-style: none;
}

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

.mono {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.nw {
  white-space: nowrap;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

/* ---------- шапка ---------- */
.head {
  border-bottom: 1px solid var(--rule);
}

.head__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
}

.brand {
  display: block;
  flex: none;
}

.brand img {
  width: 160px;
  height: auto;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  position: relative;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.nav a[aria-current=page] {
  color: var(--leaf-ink);
}

.nav a[aria-current=page]::after {
  height: 2px;
  background: var(--leaf);
  transform: scaleX(1);
}

/* ---------- шапка раздела ---------- */
.mast {
  padding: 56px 0 72px;
}

.mast__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 40px;
  align-items: end;
}

.crumbs {
  grid-column: 1/-1;
  color: var(--pencil);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 10px;
  color: var(--rule);
}

.crumbs a {
  text-decoration: none;
  color: var(--graphite);
}

.crumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.crumbs [aria-current] {
  color: var(--ink);
}

.mast__h {
  grid-column: 1/-1;
  font-weight: 700;
  font-size: clamp(48px, 6.6vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.mast__h b {
  color: var(--leaf);
  font-weight: inherit;
}

.mast__aside {
  grid-column: 1/span 9;
  padding-bottom: 6px;
}

.mast__lead {
  font-size: 18px;
  line-height: 29px;
  color: var(--graphite);
}

/* ---------- карточка статьи ----------
   Узко (до 1024): гравюра → название на пергаменте → описание и действия → оглавление.
   Широко: гравюра целиком слева, справа пергаментная панель с названием и «Читать статью» —
   обе попадают в первый экран ноутбука; ниже оглавление под гравюрой и описание под панелью. */
.list {
  padding-bottom: 112px;
}

.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--sheet);
  border: 1px solid var(--ink);
}

.card + .card {
  margin-top: 64px;
}

.card__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--ink);
  color: var(--graphite);
}

.card__bar > span:first-child {
  color: var(--ink);
}

.card__rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* гравюра — дубль ссылки заголовка для мыши, без фокуса и без озвучки */
.card__fig {
  display: block;
  background: var(--vellum);
  overflow: hidden;
}

.card__img {
  width: 100%;
  transition: transform 1.2s var(--ease);
}

.card__fig:hover .card__img {
  transform: scale(1.015);
}

.card__head {
  padding: 28px 24px 36px;
  background: var(--vellum);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--ink);
  text-align: center;
  color: var(--sepia);
}

.card__tab {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cinnabar);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.card__tab::before, .card__tab::after {
  content: "";
  width: 40px;
  height: 1px;
  background: currentColor;
}

.card__h {
  margin-top: 14px;
  font: italic 600 clamp(30px, 6.4vw, 46px)/1.06 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.card__h a {
  text-decoration: none;
  background: linear-gradient(var(--cinnabar), var(--cinnabar)) 0 92%/0 1px no-repeat;
  transition: background-size 0.6s var(--ease);
}

.card__h a:hover, .card:has(.card__fig:hover) .card__h a, .card__h a:focus-visible {
  background-size: 100% 1px;
}

.card__h a:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 4px;
}

.card__lead {
  padding: 40px 40px 0;
  font-size: 20px;
  line-height: 32px;
}

.card__acts {
  padding: 32px 40px 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 24px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  text-decoration: none;
  transition: background 0.3s;
}

.btn:hover {
  background: var(--leaf-ink);
}

.arr {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  transition: transform 0.45s var(--ease);
}

.btn:hover .arr {
  transform: translateX(4px);
}

.link {
  font-weight: 600;
  font-size: 16px;
  text-decoration: underline;
  text-decoration-color: var(--leaf);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.link:hover {
  color: var(--leaf-ink);
}

.card__toc {
  padding: 36px 40px 40px;
  border-top: 1px solid var(--rule);
}

.card__toc-h {
  color: var(--pencil);
  font-weight: 500;
  margin-bottom: 4px;
}

.toc {
  columns: 2;
  column-gap: 40px;
}

.toc li {
  break-inside: avoid;
  border-bottom: 1px solid var(--rule);
}

/* ссылкой служит вся строка оглавления: номер, название и поля до линейки */
.toc a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: baseline;
  padding: 13px 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  text-decoration: none;
}

.toc .mono {
  color: var(--cinnabar);
}

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

.toc a:focus-visible {
  outline-offset: -2px;
}

@media (min-width: 1024px) {
  .card {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-rows: auto 1fr auto auto;
    grid-template-areas: "bar bar" "fig head" "fig acts" "toc lead";
  }
  .card__bar {
    grid-area: bar;
  }
  .card__fig {
    grid-area: fig;
    align-self: stretch;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--ink);
  }
  .card__head {
    grid-area: head;
    border: 0;
    border-left: 1px solid var(--ink);
    padding: 40px 40px 0;
    text-align: left;
  }
  .card__tab::before {
    display: none;
  }
  .card__h {
    margin-top: 20px;
    font-size: clamp(36px, 3.1vw, 46px);
  }
  .card__acts {
    grid-area: acts;
    padding: 28px 40px 40px;
    background: var(--vellum);
    border-left: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    box-shadow: 0 -1px 0 var(--vellum); /* дробная граница строк сетки не просвечивает белой линией */
  }
  .card__lead {
    grid-area: lead;
    padding: 36px 40px 40px;
    border-left: 1px solid var(--rule);
    font-size: 18px;
    line-height: 29px;
    color: var(--graphite);
  }
  .card__toc {
    grid-area: toc;
    border-top: 0;
  }
}
/* мир статьи «Как создать сайт с помощью ИИ» — «Наклейки»: сиреневая панель, розовые номера,
   рукописный заголовок; лист карточки на белой бумаге статьи */
.card--stickers {
  --vellum: #EFE8FF;
  --sepia: #1B1530;
  --cinnabar: #C4176C;
}

.card--stickers .card__fig {
  background: #FFFDFB;
}

.card--stickers .card__h {
  font: 700 clamp(40px, 9vw, 58px)/1 "Amatic SC", var(--font);
  letter-spacing: 0.01em;
}

.card--stickers .card__h a {
  background-position: 0 96%;
  background-size: 0 2px;
}

.card--stickers .card__h a:hover, .card--stickers:has(.card__fig:hover) .card__h a, .card--stickers .card__h a:focus-visible {
  background-size: 100% 2px;
}

@media (min-width: 1024px) {
  .card--stickers .card__h {
    font-size: clamp(48px, 4.2vw, 62px);
  }
}
/* ---------- подвал ---------- */
.foot {
  background: var(--ink);
  color: var(--night-text);
  padding: 64px 0 40px;
}

.foot :focus-visible {
  outline-color: var(--leaf-dark);
}

.foot__in {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 40px;
}

.foot__brand {
  grid-column: 1/span 5;
  display: grid;
  gap: 14px;
  align-content: start;
}

.foot__brand a {
  justify-self: start;
}

.foot__brand img {
  width: 192px;
  height: auto;
}

.foot__brand p {
  font-size: 16px;
}

.foot__nav {
  grid-column: span 3;
}

.foot__nav + .foot__nav {
  grid-column: span 4;
}

.foot__k {
  color: #8E99AB;
  font-size: 11px;
  margin-bottom: 12px;
}

.foot__nav li + li {
  margin-top: 2px;
}

.foot__nav a {
  display: inline-block;
  padding: 5px 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.foot__nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--leaf-dark);
  text-underline-offset: 4px;
}

.foot__nav a[aria-current=page] {
  color: var(--leaf-dark);
}

.foot__copy {
  grid-column: 1/-1;
  padding-top: 24px;
  border-top: 1px solid var(--night-line);
  color: #8E99AB;
}

/* ---------- вступление ---------- */
/* без opacity: заголовок и гравюра — кандидаты LCP, они видны с первого кадра */
@keyframes rise {
  from {
    transform: translateY(14px);
  }
  to {
    transform: none;
  }
}
@keyframes develop {
  from {
    filter: saturate(0) contrast(0.85) brightness(1.06);
  }
  to {
    filter: none;
  }
}
.mast__h, .mast__aside {
  animation: rise 0.8s var(--ease) both;
}

.mast__aside {
  animation-delay: 0.12s;
}

.card {
  animation: rise 0.9s var(--ease) 0.2s both;
}

.card__img {
  animation: develop 1.4s ease-out 0.3s both;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .card__fig:hover .card__img {
    transform: none;
  }
}
/* ---------- адаптив ---------- */
/* широкий экран: компактная шапка раздела в одну строку, чтобы карточка начиналась в первом экране */
@media (min-width: 1101px) {
  .mast {
    padding: 32px 0 40px;
  }
  .mast__grid {
    row-gap: 24px;
  }
  .mast__h {
    grid-column: 1/span 7;
    font-size: clamp(52px, 4.2vw, 64px);
  }
  .mast__aside {
    grid-column: 8/-1;
  }
  .mast__lead {
    font-size: 17px;
    line-height: 27px;
  }
}
@media (max-width: 900px) {
  :root {
    --side: 24px;
  }
  .mast__aside {
    grid-column: 1/-1;
  }
  .foot__brand {
    grid-column: 1/-1;
  }
  .foot__nav, .foot__nav + .foot__nav {
    grid-column: span 6;
  }
}
@media (max-width: 640px) {
  :root {
    --side: 16px;
  }
  .head__in {
    height: 64px;
  }
  .brand img {
    width: 128px;
  }
  .nav {
    gap: 20px;
  }
  .mast {
    padding: 32px 0 40px;
  }
  .mast__grid {
    row-gap: 24px;
  }
  .mast__h {
    font-size: clamp(40px, 12vw, 56px);
  }
  .mast__lead {
    font-size: 17px;
    line-height: 27px;
  }
  .list {
    padding-bottom: 64px;
  }
  .card + .card {
    margin-top: 40px;
  }
  .card__bar {
    padding: 12px 16px;
    gap: 12px;
  }
  .card__head {
    padding: 22px 16px 28px;
  }
  .card__tab::before, .card__tab::after {
    width: 20px;
  }
  .card__lead {
    padding: 28px 16px 0;
    font-size: 17px;
    line-height: 27px;
  }
  .card__acts {
    padding: 24px 16px 32px;
  }
  .card__toc {
    padding: 24px 16px 20px;
  }
  .toc {
    columns: 1;
  }
  .foot {
    padding: 48px 0 32px;
  }
  .foot__nav, .foot__nav + .foot__nav {
    grid-column: 1/-1;
  }
}
@media (max-width: 420px) {
  .nav__extra {
    display: none;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
}
