/* Аскикаш — стили. Один файл, без внешних зависимостей и без скриптов. */

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/GolosText-cyrillic.woff2") format("woff2");
  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-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/GolosText-latin.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;
}

:root {
  --bg: #fbf7f2;
  --paper: #ffffff;
  --text: #2a2420;
  --muted: #6b625b;
  --line: #e7ded4;
  --accent: #b9502b;
  --accent-dark: #96401f;
  --accent-soft: #f8e7de;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(42, 36, 32, 0.05), 0 10px 28px rgba(42, 36, 32, 0.08);
  --font: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

/* На коротких страницах подвал остаётся прижат к низу экрана */
main {
  flex: 1 0 auto;
  width: 100%;
  min-width: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--paper);
  border-radius: 8px;
}

.skip:focus {
  left: 8px;
}

/* Шапка */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff9f1;
}

.header-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 28px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.nav a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
  text-decoration: none;
}

/* Главный экран */
.hero {
  padding: 56px 0 48px;
  background: linear-gradient(180deg, #fff9f1 0%, var(--bg) 100%);
}

.hero-in {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 800;
  line-height: 1.1;
}

.lead {
  max-width: 580px;
  margin: 0;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.hero-art .hero-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 520 / 420;
}

/* Секции и карточки */
.section {
  padding: 52px 0;
}

.section-head {
  margin-bottom: 26px;
}

.section-head h2,
.cat-row h2,
.about-note h2,
.ask h2 {
  margin: 0;
  font-size: clamp(24px, 2.8vw, 32px);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(42, 36, 32, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card .art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
}

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

.card:hover h3 {
  color: var(--accent-dark);
}

.card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.card .meta {
  margin-top: auto;
  padding-top: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.chip::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.meta {
  font-size: 14px;
  color: var(--muted);
}

.cat-block--alt {
  background: #f5eee5;
}

.cat-row {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 56px;
  align-items: start;
}

.cat-info p:not(.eyebrow) {
  margin: 12px 0 18px;
  color: var(--muted);
}

.more {
  font-weight: 600;
  white-space: nowrap;
}

.more::after {
  content: " →";
}

.cat-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cat-list a {
  display: grid;
  grid-template-columns: 84px 1fr;
  grid-template-rows: auto auto;
  gap: 0 16px;
  align-items: center;
  padding: 10px 16px 10px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
}

.cat-list a:hover {
  text-decoration: none;
  border-color: #d6c9ba;
}

.cat-list .thumb {
  grid-row: 1 / 3;
}

.thumb .art {
  display: block;
  width: 84px;
  height: 60px;
  border-radius: 9px;
}

.thumb-title {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
}

.ask {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 40px;
  background: var(--accent);
  border-radius: 24px;
  color: #fff;
}

.ask p {
  margin: 10px 0 0;
  color: #fdeae1;
}

.btn {
  display: inline-block;
  flex: none;
  padding: 13px 24px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 600;
}

.btn:hover {
  text-decoration: none;
  background: #fdeae1;
}

.about-note h3 {
  margin: 36px 0 14px;
  font-size: 20px;
}

.about-note > .wrap > p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
}

.inline-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inline-list li::before {
  margin-right: 10px;
  color: var(--accent);
  content: "—";
}

/* Статья и текстовые страницы */
.article,
.page {
  max-width: 792px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

.page-head {
  max-width: 1120px;
  padding-top: 40px;
}

.page-head h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 44px);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 14px;
  color: var(--muted);
}

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

h1 {
  margin: 12px 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.14;
}

.article-excerpt {
  margin: 0 0 20px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--muted);
}

.article-cover {
  margin: 26px 0 30px;
  overflow: hidden;
  border-radius: 20px;
}

.article-cover .art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.prose {
  font-size: 18px;
  line-height: 1.72;
}

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

.prose h2 {
  margin: 44px 0 14px;
  font-size: 26px;
}

.prose p {
  margin: 0 0 18px;
}

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

.prose li {
  margin: 7px 0;
}

.prose li::marker {
  color: var(--accent);
  font-weight: 700;
}

.callout {
  margin: 24px 0;
  padding: 16px 22px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 16px 16px 0;
}

.callout p {
  margin: 0;
}

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

.table-wrap {
  max-width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.5;
}

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

th {
  background: #faf4ec;
  font-size: 14.5px;
}

tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  font-weight: 600;
  white-space: nowrap;
}

.ask-line {
  margin: 28px 0 0;
  padding: 16px 22px;
  background: var(--paper);
  border: 1px dashed #d6c9ba;
  border-radius: 16px;
  font-size: 16px;
  color: var(--muted);
}

.more-list {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.more-list h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.page--center {
  padding-top: 72px;
  text-align: center;
}

.page--center h2,
.page--center .inline-list {
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
  text-align: left;
}

.page--center h2 {
  margin-top: 48px;
  font-size: 22px;
}

.page--center .lead {
  margin: 0 auto 24px;
}

.code {
  margin: 0;
  font-size: clamp(72px, 14vw, 132px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--accent-soft);
  -webkit-text-stroke: 2px var(--accent);
}

/* Подвал */
.site-footer {
  padding: 48px 0 28px;
  background: #241f1b;
  color: #d8d0c8;
}

.footer-in {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 40px;
}

.site-footer .logo {
  color: #fff;
}

.site-footer .footer-about p {
  max-width: 320px;
  margin: 14px 0 0;
  font-size: 15px;
}

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

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15.5px;
}

.site-footer a {
  color: #d8d0c8;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13.5px;
  color: #a69c93;
}

.age {
  padding: 1px 7px;
  border: 1px solid #a69c93;
  border-radius: 5px;
  font-weight: 700;
}

/* Экраны */
@media (max-width: 1020px) {
  .hero-in {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-art {
    max-width: 440px;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .cat-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 820px) {
  .hero {
    padding: 36px 0 32px;
  }

  .section {
    padding: 40px 0;
  }

  .ask {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
  }

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

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .header-in {
    gap: 4px;
  }

  .nav a {
    padding: 5px 10px;
    font-size: 15px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .cat-list a {
    grid-template-columns: 68px 1fr;
  }

  .thumb .art {
    width: 68px;
    height: 50px;
  }

  .prose {
    font-size: 17px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .ask-line,
  .more-list {
    display: none;
  }

  body {
    background: #fff;
  }
}
