/*
 * Визитка адвоката - стили. Направление "редакционный журнал".
 * CSP сайта запрещает inline-стили: всё оформление только здесь.
 *
 * Разделы файла:
 *   1. Шрифты и токены
 *   2. База
 *   3. Компоненты (кнопки, заголовки разделов)
 *   4. Шапка
 *   5. Первый экран
 *   6. Разделы 01-06 (в т.ч. блог: посты и карточки каналов), подвал
 *   7. Меню на JS и reveal
 *   404. Страница 404
 */

/* ---------- 1. Шрифты и токены ---------- */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-cyrillic-wght-normal.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: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-latin-wght-normal.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: 300 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-cyrillic-wght-italic.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: 300 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-latin-wght-italic.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: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/manrope-cyrillic-wght-normal.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-latin-wght-normal.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: #F3EDE4;
  --bg-soft: #F8F4ED;
  --text: #1C1A17;
  /* Спека: #7A736A, но контраст на фоне ~4.1:1, для мелкого текста мало (AA = 4.5:1).
     Чуть затемнён до #6B645B (~5.1:1). */
  --muted: #6B645B;
  --line: #D9CFC0;
  --accent: #9A6F45;
  /* Бронза для мелкого текста на светлом фоне (~5.4:1) и для текста на тёмном. */
  --accent-ink: #80592F;
  --accent-light: #C9A074;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1360px;
  --pad: clamp(20px, 5vw, 64px);
  --gap: clamp(16px, 2.2vw, 32px);
  --header-h: 68px;
  --section-y: clamp(72px, 11vw, 168px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. База ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* страховка от горизонтального скролла; clip (в отличие от hidden) не ломает sticky */
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.02;
  text-wrap: balance;
}
h1 em, h2 em, h3 em { color: var(--accent); font-weight: 400; }

::selection { background: var(--accent); color: var(--bg); }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  font-size: .875rem;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

.eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* ---------- 3. Компоненты ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .9em;
  padding: 1.05em 1.9em;
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  font: 600 .78rem/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn:hover { background: var(--text); color: var(--bg); }
.btn--solid { background: var(--text); color: var(--bg); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }
.btn--sm { padding: .9em 1.3em; font-size: .72rem; }

/* стрелка рисуется маской, цвет берёт у текста */
.arrow {
  display: inline-block;
  width: 1.6em;
  height: .8em;
  background: currentColor;
  -webkit-mask: url("/img/arrow.svg") center / contain no-repeat;
  mask: url("/img/arrow.svg") center / contain no-repeat;
  transition: transform .3s var(--ease);
}
a:hover > .arrow,
.btn:hover .arrow,
.arrow-link:hover .arrow { transform: translateX(5px); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: .8em;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--accent);
}

/* заголовок раздела: крупный номер + название */
.sec {
  position: relative;
  padding-block: var(--section-y);
  border-top: 1px solid var(--line);
}
.sec-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 96px);
}
.sec-num {
  grid-column: 1 / -1;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3.6rem, 9vw, 9rem);
  line-height: .8;
  color: var(--accent);
  letter-spacing: -.03em;
}
.sec-title {
  grid-column: 1 / -1;
  margin-top: 18px;
  font-size: clamp(2.3rem, 5.4vw, 4.6rem);
}
@media (min-width: 900px) {
  .sec-num { grid-column: 1 / 4; }
  .sec-title { grid-column: 4 / -1; margin-top: 0; padding-bottom: .12em; }
}

/* ---------- 4. Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 237, 228, .94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 16px;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: .6em;
  margin-right: auto;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
}
.brand small {
  font: 600 .65rem/1 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.nav { flex-basis: 100%; order: 3; padding-bottom: 12px; }
.nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.nav a {
  display: inline-block;
  padding: 6px 0;
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s;
}
.nav a:hover { color: var(--text); }
.nav a span {
  margin-right: .4em;
  font-family: var(--serif);
  font-style: italic;
  font-size: .95em;
  color: var(--accent-ink);
}
.site-header .btn { order: 2; }

@media (min-width: 1000px) {
  .site-header__bar { flex-wrap: nowrap; column-gap: 40px; }
  .brand { margin-right: 0; }
  .nav { flex: 1; order: 0; padding-bottom: 0; }
  .nav ul { justify-content: flex-end; gap: 0 clamp(16px, 2vw, 32px); }
  .nav a { font-size: .85rem; }
}

/* ---------- 5. Первый экран ---------- */

.hero {
  padding-top: clamp(40px, 6vw, 96px);
  background:
    radial-gradient(120% 80% at 85% 0%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 70%);
}
.hero__grid { align-items: end; row-gap: clamp(40px, 7vw, 64px); }
.hero__text { grid-column: 1 / -1; }
.hero__eyebrow { max-width: 34ch; line-height: 1.7; }
.hero__name {
  margin-top: clamp(20px, 3vw, 36px);
  font-size: clamp(4.2rem, 19vw, 9.6rem);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.025em;
}
.hero__name span,
.hero__name em { display: block; }
.hero__name em { margin-left: .12em; }
.hero__lede {
  margin-top: clamp(24px, 3.5vw, 44px);
  max-width: 18ch;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.12;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  margin-top: clamp(28px, 4vw, 52px);
}

.hero__figure { grid-column: 1 / -1; position: relative; isolation: isolate; margin-right: 14px; }
.hero__figure::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--accent);
  z-index: -1;
}
.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}
.hero__tag { display: none; }

.facts {
  display: grid;
  gap: 0;
  margin-top: clamp(56px, 8vw, 112px);
  padding-block: 0 clamp(40px, 5vw, 64px);
}
.facts li { padding: 18px 0 20px; border-top: 1px solid var(--line); }
.facts span {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts strong {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.2;
}

@media (min-width: 700px) {
  .facts { grid-template-columns: repeat(3, 1fr); column-gap: var(--gap); }
  .hero__figure { max-width: 440px; justify-self: end; width: 100%; }
}
@media (max-width: 520px) {
  .brand small { display: none; }
  .btn { letter-spacing: .08em; padding-inline: 1.4em; }
  .hero__cta .btn { font-size: .7rem; }
}
@media (min-width: 1000px) {
  .hero { padding-top: clamp(56px, 6vw, 96px); }
  .hero__text { grid-column: 1 / 8; }
  .hero__name { font-size: clamp(6rem, 10.6vw, 9.6rem); }
  .hero__figure { grid-column: 8 / -1; margin-right: 18px; max-width: none; }
  .hero__figure::before { inset: 18px -18px -18px 18px; }
}
@media (min-width: 1280px) {
  .hero__tag {
    display: block;
    position: absolute;
    left: -34px;
    bottom: 0;
    transform-origin: left bottom;
    transform: rotate(-90deg);
    white-space: nowrap;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

/* ---------- 6. Разделы 01-06, подвал ---------- */

.lede {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.7vw, 2.5rem);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -.005em;
  text-wrap: pretty;
}

.line-link {
  display: inline-block;
  margin-right: 1.4em;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--accent);
  transition: color .2s, border-color .2s;
}
.line-link:hover { color: var(--accent-ink); border-color: var(--text); }

/* 01 Обо мне */
.about__fig { grid-column: 1 / -1; width: min(240px, 60%); margin-bottom: 40px; }
.about__fig img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 20%;
  filter: grayscale(1) contrast(1.05);
}
.about__body { grid-column: 1 / -1; }
.about__text { max-width: 60ch; margin-top: clamp(28px, 4vw, 48px); }
.about__text p + p { margin-top: 1em; }
.about__text p { color: var(--muted); }

.edu { margin-top: clamp(40px, 6vw, 72px); }
.edu > div {
  display: grid;
  gap: 6px 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.edu > div:last-child { border-bottom: 1px solid var(--line); }
.edu dt {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  padding-top: .5em;
}
.edu dd {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.6vw, 1.6rem);
  line-height: 1.25;
}

@media (min-width: 900px) {
  .about__fig { grid-column: 1 / 4; width: 100%; margin-bottom: 0; align-self: start; }
  .about__body { grid-column: 4 / -1; }
  .edu > div { grid-template-columns: minmax(150px, 1fr) 3fr; }
  .edu dt { grid-row: 1 / span 2; }
  .edu dd { grid-column: 2; }
}

/* 02 Услуги */
.svc {
  display: grid;
  gap: 28px;
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--text);
}
.svc + .svc { margin-top: clamp(56px, 8vw, 112px); border-top-color: var(--line); }
.svc__head h3 { margin-top: 14px; font-size: clamp(2.2rem, 3.6vw, 3.6rem); }
.svc--main .svc__head h3 { font-size: clamp(2.6rem, 5vw, 4.8rem); }
.svc__list li {
  display: grid;
  gap: 6px 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.svc__list li:first-child { padding-top: 0; }
.svc__list h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 1.8vw, 1.75rem);
  font-weight: 600;
  line-height: 1.15;
}
.svc__list p { color: var(--muted); max-width: 52ch; }

@media (min-width: 900px) {
  .svc { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
  .svc__head { grid-column: 1 / 4; }
  .svc__list { grid-column: 4 / -1; }
  .svc__list li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .svc__list li:first-child { padding-top: 6px; }
}

/* 03 Как я работаю */
.steps { display: grid; gap: 0; counter-reset: none; }
.steps li { padding: 28px 0 36px; border-top: 1px solid var(--line); }
.steps__n {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(4rem, 6vw, 6rem);
  line-height: .9;
  color: var(--accent);
}
.steps h3 { margin-top: 20px; font-size: clamp(1.6rem, 2vw, 2rem); font-weight: 600; }
.steps p { margin-top: 12px; color: var(--muted); max-width: 40ch; }

@media (min-width: 700px) {
  .steps { grid-template-columns: repeat(2, 1fr); column-gap: var(--gap); }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

/* 04 Блог: карточка канала */
.channel {
  display: grid;
  gap: 20px;
  max-width: 640px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
}
.channel h3 { font-size: clamp(1.7rem, 2.6vw, 2.4rem); line-height: 1.12; font-weight: 500; }
.channel .arrow-link { justify-self: start; margin-top: 8px; }

/* 04 Блог: посты в колонке автора + карточки каналов */
.blog { display: grid; gap: clamp(40px, 6vw, 64px); }
.posts { display: grid; gap: 0; align-content: start; }
.post {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
}
.post:first-child { border-top-color: var(--text); }
.post__date {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.post__text {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.5vw, 1.55rem);
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post .arrow-link { margin-top: auto; }

.blog__side { display: grid; gap: 20px; align-content: start; }
.channel--max { background: transparent; }
.channel__top { display: flex; align-items: center; gap: 16px; }
.channel__top img { width: 56px; height: 56px; }
.channel--max h3 { font-size: clamp(1.5rem, 2vw, 1.9rem); }

@media (min-width: 700px) {
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
  .post:nth-child(2) { border-top-color: var(--text); }
}
@media (min-width: 1100px) {
  .blog { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: calc(var(--gap) * 2); }
  .channel { max-width: none; }
}

/* 05 Запись на консультацию: тёмная плашка */
.sec--dark {
  background: var(--text);
  color: var(--bg);
  border-top: 0;
  --line: rgba(243, 237, 228, .2);
  --muted: #BDB4A6;
}
.sec--dark .sec-num,
.sec--dark h2 em,
.sec--dark h3 em { color: var(--accent-light); }
.sec--dark ::selection { background: var(--accent-light); color: var(--text); }
.sec--dark :focus-visible { outline-color: var(--accent-light); }

.formats { display: grid; gap: 0; }
.formats li { padding: 22px 0; border-top: 1px solid var(--line); }
.formats h3 { font-size: clamp(1.7rem, 2.4vw, 2.2rem); font-style: italic; font-weight: 400; }
.formats p { margin-top: 8px; color: var(--muted); max-width: 34ch; }
@media (min-width: 800px) {
  .formats { grid-template-columns: repeat(3, 1fr); column-gap: var(--gap); }
}

.tiles { display: grid; gap: 14px; margin-top: clamp(40px, 6vw, 80px); }
.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 176px;
  padding: 24px 26px;
  border: 1px solid rgba(243, 237, 228, .35);
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.tile__label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .35s var(--ease);
}
.tile__value {
  font-variant-numeric: lining-nums;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.3vw, 2.2rem);
  font-weight: 500;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.tile .arrow { align-self: flex-end; width: 2.2em; margin-top: -24px; color: var(--accent-light); transition: transform .35s var(--ease), color .35s var(--ease); }
.tile:hover { background: var(--bg); color: var(--text); border-color: var(--bg); }
.tile:hover .tile__label { color: var(--accent-ink); }
.tile:hover .arrow { color: var(--accent-ink); transform: translateX(6px); }
@media (min-width: 900px) {
  .tiles { grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
}
.booking__note { margin-top: 28px; font-size: .9rem; color: var(--muted); }

/* 06 Контакты */
.sec--last { padding-bottom: clamp(56px, 8vw, 112px); }
.contacts > div {
  display: grid;
  gap: 8px 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.contacts > div:last-child { border-bottom: 1px solid var(--line); }
.contacts dt {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.contacts dd { font-variant-numeric: lining-nums; font-family: var(--serif); font-size: clamp(1.4rem, 1.8vw, 1.8rem); line-height: 1.25; }
.contacts__big { font-size: clamp(2rem, 4vw, 3.4rem) !important; line-height: 1.05 !important; }
.contacts__big a { border-bottom: 1px solid var(--accent); transition: color .2s; }
.contacts__big a:hover { color: var(--accent-ink); }
@media (min-width: 900px) {
  .contacts { margin-left: calc((100% + var(--gap)) / 12 * 3); }
  .contacts > div { grid-template-columns: minmax(120px, 1fr) 3fr; align-items: baseline; }
}

/* Подвал */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px 48px; font-size: .82rem; color: var(--muted); line-height: 1.8; }
.site-footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.site-footer__right { text-align: left; }
.site-footer .line-link { margin-right: 0; color: var(--text); }
@media (min-width: 700px) { .site-footer__right { text-align: right; } }

/* ---------- 7. Меню на JS и reveal ---------- */

.menu-btn {
  display: none;
  order: 2;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: transform .3s var(--ease);
}
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 999px) {
  .js .menu-btn:not([hidden]) { display: inline-flex; }
  .js .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 4px var(--pad) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .js .nav.is-open { display: block; }
  .js .nav ul { flex-direction: column; gap: 0; }
  .js .nav a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: 1.7rem;
    font-weight: 500;
    color: var(--text);
  }
  .js .nav a span { font-size: .9rem; margin-right: .8em; }
}
@media (max-width: 520px) {
  .site-header__bar { column-gap: 10px; }
  .brand { font-size: 1.25rem; }
  .site-header .btn { padding-inline: 1em; }
  /* на узком экране кнопка шапки не помещается рядом с меню; запись есть в первом экране */
  .js .site-header .btn { display: none; }
}

/* без JS блоки видны сразу: класс reveal ставит скрипт и только если нет prefers-reduced-motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.steps li:nth-child(2).reveal, .formats li:nth-child(2).reveal, .tile:nth-child(2).reveal, .post:nth-child(2).reveal { transition-delay: .1s; }
.steps li:nth-child(3).reveal, .formats li:nth-child(3).reveal, .tile:nth-child(3).reveal, .post:nth-child(3).reveal { transition-delay: .2s; }
.steps li:nth-child(4).reveal, .post:nth-child(4).reveal { transition-delay: .3s; }

/* ---------- 404 ---------- */

.nf {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-block: 64px;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.nf__num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(6rem, 22vw, 15rem);
  line-height: .8;
  color: var(--accent);
}
.nf__title { margin-top: 24px; font-size: clamp(2.4rem, 6vw, 4.6rem); }
.nf__text { margin: 20px 0 36px; color: var(--muted); }

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