/* GERSH: общие стили всех страниц сайта, подключаются после стилей набора (assets/*) */

/* шрифты из ZETAFONTS GOLD PACK по выбору клиента (вместо пары Google Fonts из start.mjs) */
@font-face { font-family: "Lovelace"; src: url("fonts/Lovelace-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Unigeo64"; src: url("fonts/Unigeo64-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Unigeo64"; src: url("fonts/Unigeo64-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
:root {
  --p-bg: #f6f2ec; --p-surface: #ece4d9; --p-ink: #1d1918; --p-muted: #67625f;
  --p-accent: #7a1f2b; --p-accent-ink: #f6f2ec; --p-action: #7a1f2b; --p-action-ink: #f6f2ec;
  --p-inv-bg: #1d1918; --p-inv-surface: #292524; --p-inv-ink: #f6f2ec; --p-inv-muted: #9c9793;
  --p-inv-accent: #f6f2ec; --p-inv-accent-ink: #1d1918; --p-inv-action: #f6f2ec; --p-inv-action-ink: #1d1918;
  --font-display: "Lovelace", Georgia, serif;
  --font-text: "Unigeo64", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.018em;
  --display-tracking-xl: -0.025em;
  --ly-scale: 0.8; /* Lovelace is wider than the dealt Newsreader: 1.06 broke the h1 into 5 lines */
}

/* ---------------------------------------------------------------- плотный ритм
   Набор растягивает каждый блок ровно на один-два экрана, и короткий блок оставлял под собой
   до 300px пустого фона. По просьбе клиента блоки идут по высоте содержимого с ровным зазором:
   первый экран (hero) и закреплённые главы (moments) остаются как были. */
:root { --padt: 64px; --padb: 64px; }
@media (max-width: 1023px) { :root { --padt: 56px; --padb: 56px; } }
@media (max-width: 639px) { :root { --padt: 48px; --padb: 48px; } }
html { scroll-padding-top: var(--nav); }
main > :is(section, .section):not(.hero, .section--hero, [data-moment]), footer.closing { height: auto; min-height: 0; }
html main > [data-moment][data-moment]:not(.is-live) { min-height: 0; }
/* то, что раньше занимало остаток экрана, теперь своего размера */
main > :is(section, .section) > .wrap > .fill { flex: none; }
@media (min-width: 1024px) { .grid.fill > .frame--fill { min-height: 560px; } }
@media (max-width: 1023px) { .grid.fill > .frame--fill { flex: none; aspect-ratio: 4 / 3; min-height: 0; } }
/* закрытие: фото полосой, ссылки сразу под ним */
footer.closing > .wrap { grid-template-rows: auto auto; }
.closing__cta > .close__media { flex: none; aspect-ratio: 16 / 7; min-height: 0; }
@media (max-width: 639px) {
  footer.closing:has(> .wrap > .closing__cta > .close__media) > .wrap { grid-template-rows: auto auto; row-gap: var(--s-8); }
  .closing__cta > .close__media { aspect-ratio: 4 / 3; min-height: 0; }
}

/* ---------------------------------------------------------------- общие части */
/* booking-form recipe: the form on the surface ground, 48px padding */
:is(#signup, #buy) .form { background: var(--surface); padding: var(--s-7); border-radius: var(--r-lg); }
@media (max-width: 639px) { :is(#signup, #buy) .form { padding: var(--s-5); } }

/* ---------------------------------------------------------------- главная */
#steps .panel, #lessons .panel { --p-h: 336px; }
@media (max-width: 639px) { #steps .panel { --p-h: 280px; } #lessons .panel { --p-h: 260px; } }
/* the author's picture wall (layout-v4.md: .wall, gap 2px, line to line): 4 across, two-up under 1024 */
#author .wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
#author .wall > img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 1024px) and (max-width: 1279px) { #author .wall > img { aspect-ratio: 1; } }
@media (max-width: 1023px) { #author .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 1023px) { #author .wall > img { aspect-ratio: 4 / 3; } }
@media (max-width: 639px) { #author .wall > img { aspect-ratio: 1; } }
/* the chapters: a landscape photograph on a wide screen, a portrait crop of the same shot on a phone (the live stage is portrait there) */
#course .mo-ph__pic > img.m-only { display: none; }
@media (max-width: 639px) { #course .mo-ph__pic > img.d-only { display: none; } #course .mo-ph__pic > img.m-only { display: block; } }
/* panels here hold a full-cover photograph or video poster: the kit's UI-panel sheen under it never shows, so drop it */
#steps .panel::before, #lessons .panel::before, #related .panel::before { content: none; }

/* ---------------------------------------------------------------- страница урока */
#related .panel { --p-h: 300px; }
/* a phone: the film hero's words box takes 16px less on each side, so a long Russian h1 keeps to three lines */
@media (max-width: 639px) { .hero--film .hero__over { padding: var(--s-2); } .hero--film .hero__over > :first-child { padding: var(--s-4); } }
/* a phone: the specs read as a definition list, each value right after its name instead of across an empty middle */
@media (max-width: 639px) { #specs .rows > li { grid-template-columns: 7.5em minmax(0, 1fr); } #specs .rows__value { text-align: left; white-space: normal; max-width: none; } }
/* the result pair: 4:3, side by side from 640 */
#result .frame { --ratio: 75%; }
@media (min-width: 640px) and (max-width: 1023px) { #result .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } #result .grid > .span-6 { grid-column: auto; } }
