/* Johannes Hammerschmidt — вариант B «Газетная полоса».
   Сначала телефон, потом планшет (760px) и компьютер (1100px). */

:root {
  --bg: #fbfaf7;
  --field: #f0ede6;
  --ink: #141414;
  --muted: #55524d;
  --accent: #b0201a;
  --accent-hover: #8f1914;
  --accent-ink: #ffffff;

  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "PT Sans", "Helvetica Neue", Arial, sans-serif;

  --margin: 16px;
  --section: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--sans);
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.1; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[id] { scroll-margin-top: 16px; }

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

.skip { position: absolute; left: var(--margin); top: -100px; background: var(--ink); color: #fff; padding: 12px 16px; z-index: 10; }
.skip:focus { top: 8px; }

/* Ссылки и кнопки */
.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; display: inline-block; padding-block: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 17px/1.2 var(--sans); text-decoration: none;
  transition: background-color 180ms ease, transform 140ms var(--ease);
}
.btn:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-hover); }
  .link:hover { text-decoration-thickness: 2px; }
}
.meta, .note, .price { color: var(--muted); font-size: 15px; }

/* Верхняя строка */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 14px; }
.wordmark { font: 700 19px/1.2 var(--serif); text-decoration: none; padding-block: 8px; }
.nav { display: none; }

/* Первый экран — телефон: фото, заголовок, кнопка */
.mast { display: none; }
.hero__photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.hero__text { padding-top: 20px; }
.hero h1 { font-size: clamp(27px, 7.4vw, 34px); font-weight: 400; margin-bottom: 18px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 20px; }
.actions .btn { flex: 1 1 100%; }
.lead { font-size: 18px; max-width: 40ch; margin-bottom: 4px; }

/* Цифры */
.figs { background: var(--field); margin-top: 48px; padding: 36px 0 32px; }
.figs__title { font-size: 22px; margin-bottom: 20px; }
.figs__list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; margin-bottom: 20px; }
.figs__list div { display: flex; flex-direction: column-reverse; }
.figs__list div:last-child { grid-column: 1 / -1; }
.figs__list dd { font: 700 clamp(30px, 8vw, 40px)/1.05 var(--serif); }
.figs__list dt { font-size: 15px; color: var(--muted); margin-top: 4px; }

/* Разделы */
.section { padding-top: var(--section); }
.section h2, .club h2, .ads h2 { font-size: clamp(30px, 8vw, 40px); margin-bottom: 28px; }

/* Видео */
.thumb { display: block; overflow: hidden; background: var(--field); }
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 400ms var(--ease); }
.thumb--tall img { aspect-ratio: 9 / 16; }
.story, .item, .short, .story__title, .item__title { text-decoration: none; }
.story, .item { display: block; }
.story__text { display: block; padding-top: 14px; }
.story__title { display: block; font: 700 19px/1.25 var(--serif); margin-bottom: 6px; }
.item__title { display: block; font: 700 17px/1.3 var(--serif); margin-bottom: 4px; }
@media (hover: hover) and (pointer: fine) {
  .story:hover .thumb img, .item:hover .thumb img, .short:hover .thumb img { transform: scale(1.03); }
  .story:hover .story__title, .item:hover .item__title, .short:hover .item__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
}
.list { margin-top: 36px; display: grid; gap: 24px; }
.item { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: start; }
.sub { font-size: 22px; margin: 56px 0 12px; }
.shorts-note { margin-bottom: 20px; max-width: 40em; }
/* Shorts — один ряд; на телефоне прокрутка вбок, по 2 на экране */
.shorts {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 16px) / 2); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(var(--margin) * -1); padding-inline: var(--margin); scroll-padding-inline: var(--margin);
}
.shorts::-webkit-scrollbar { display: none; }
.shorts li { display: flex; scroll-snap-align: start; }
.short { display: flex; flex-direction: column; width: 100%; }
.short .thumb { margin-bottom: 10px; }
.short .item__title { font-size: 16px; flex: 1; margin-bottom: 6px; }
.more { margin-top: 28px; }

/* Johannes Club */
.club { background: var(--field); margin-top: var(--section); padding: 56px 0 64px; }
.club h2 { margin-bottom: 12px; }
.club__price { font-size: 18px; color: var(--muted); margin-bottom: 4px; }
.club__price span { font: 700 clamp(48px, 14vw, 72px)/1 var(--serif); color: var(--ink); margin-right: 6px; }
.club__terms { color: var(--muted); font-size: 16px; margin-bottom: 32px; }
.club__intro { font-weight: 700; margin-bottom: 10px; }
.club__list { margin-bottom: 32px; }
.club__list li { padding-left: 22px; position: relative; margin-bottom: 8px; }
.club__list li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 8px; height: 8px; background: var(--accent); }
.club .btn { width: 100%; }

/* Обо мне */
.about__text { max-width: 38em; }
.about__text p { margin-bottom: 16px; }
.about__lead { font: 400 21px/1.4 var(--serif); }

/* Реклама */
.ads { padding: var(--section) 0 0; }
.ads__lead { font-size: 18px; max-width: 36em; margin-bottom: 12px; }
.ads__big { display: inline-block; padding-top: 10px; font: 700 clamp(22px, 6.4vw, 30px)/1.2 var(--serif); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
@media (hover: hover) and (pointer: fine) { .ads__big:hover { text-decoration-thickness: 2px; } }

/* Подвал */
.footer { margin-top: var(--section); padding: 32px 0 20px; background: var(--ink); color: #f3f1ec; text-align: center; }
.footer__cols { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 24px; }
.footer__h { font: 700 15px/1.3 var(--sans); color: #b9b5ad; margin-bottom: 4px; }
.footer a { text-decoration: none; display: inline-block; padding-block: 6px; }
.footer a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.footer__legal { color: #b9b5ad; font-size: 15px; border-top: 1px solid #3a3835; padding-top: 16px; }
.footer__legal a { color: #f3f1ec; padding-block: 4px; }
.footer__visits { color: #b9b5ad; font-size: 14px; padding-top: 6px; }
.footer__visits[hidden] { display: none; }

/* ---------- Планшет и шире ---------- */
@media (min-width: 760px) {
  :root { --margin: 32px; --section: 112px; }
  .bar { padding-top: 22px; padding-bottom: 0; }
  .wordmark { font-size: 18px; }
  .nav { display: flex; gap: 4px 28px; font-size: 16px; }
  .nav a { text-decoration: none; display: inline-block; padding-block: 10px; }
  .nav a:hover { text-decoration: underline; text-underline-offset: 0.25em; }

  .bar { justify-content: flex-end; }
  .bar .wordmark { display: none; }
  /* Имя во всю ширину колонки: правый край имени = правый край фото */
  .hero { container-type: inline-size; }
  .mast { display: block; font: 700 calc(100cqw / 12.015)/0.95 var(--serif); letter-spacing: -0.03em; white-space: nowrap; margin: 28px 0 48px; }
  /* Колонки как у большой обложки в «Видео» (.story): фото 3fr, текст 2fr, промежуток 32px */
  .hero__grid { display: grid; grid-template-columns: 2fr 3fr; gap: 32px; align-items: center; }
  .hero__photo { order: 2; }
  .hero__text { padding: 0; }
  .hero h1 { font-size: clamp(34px, 3.6vw, 54px); margin-bottom: 28px; }
  .actions .btn { flex: 0 0 auto; }
  .lead { font-size: 19px; }
  .hero__text .lead { max-width: 40ch; }

  .figs { margin-top: 64px; padding: 44px 0; }
  .figs__list { grid-template-columns: repeat(3, 1fr); gap: 24px 32px; }
  .figs__list dd { font-size: clamp(30px, 3.8vw, 56px); white-space: nowrap; }
  .figs__list div:last-child { grid-column: auto; }

  .story { display: grid; grid-template-columns: 3fr 2fr; gap: 32px; align-items: center; }
  .story__title { font-size: clamp(22px, 2vw, 28px); }
  .list { grid-template-columns: 1fr 1fr; gap: 32px 32px; margin-top: 48px; }
  .item { grid-template-columns: 180px 1fr; gap: 18px; }
  .shorts-block { margin-top: 72px; }
  .shorts-block .sub { margin-top: 0; }
  .shorts { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; overflow: visible; margin-inline: 0; padding-inline: 0; }

  .club { padding: 80px 0; }
  .club__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .club .btn { width: auto; }

  .about { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
  .about__lead { font-size: 22px; }

  .ads__grid { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }

  .footer { padding: 40px 0 24px; }
  .footer__cols { grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 28px; }
}
}

/* ---------- Компьютер ---------- */
@media (min-width: 1100px) {
  :root { --margin: 56px; }
  .list { grid-template-columns: 1fr 1fr; gap: 40px 56px; }
  .item { grid-template-columns: 220px 1fr; }
  .item__title { font-size: 19px; }
  .short .item__title { font-size: 19px; }
  .shorts { gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .thumb img { transition: none; }
}
