/* Three opening spreads, one article and one reading order. */
.is-home { --cover-header: 112px; }
.is-home .subnav { display: none; }
.home-cover {
  position: relative;
  min-height: 100svh;
  margin-top: calc(-1 * var(--cover-header));
  padding-top: var(--cover-header);
  display: grid;
  isolation: isolate;
  color: #fff;
  background: #262723;
}
.cover-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.cover-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.cover-media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #0007, transparent 35%),
    linear-gradient(90deg, #10120fcc, #10120f40 80%),
    linear-gradient(0deg, #10120fba, transparent 70%);
}
.cover-inner {
  width: 100%; max-width: 1680px; margin-inline: auto;
  padding: 34px var(--margin) 88px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 56px;
}
.cover-edition {
  display: flex; justify-content: space-between; gap: 28px;
  font-size: 12px; line-height: 18px;
}
.cover-edition > :last-child { white-space: nowrap; }
.cover-copy { display: grid; grid-template-columns: 1fr auto; gap: 24px 56px; align-items: end; }
.cover-copy .meta { grid-column: 1/-1; font-size: 13px; line-height: 20px; color: inherit; }
.cover-copy h1 {
  grid-column: 1/-1; max-width: 1120px;
  font-size: clamp(58px, 7.2vw, 118px); line-height: .99; letter-spacing: -.05em;
  text-wrap: balance;
}
.cover-copy h1 a { text-decoration: none; }
.cover-copy .lead { max-width: 610px; font-size: 20px; line-height: 1.4; }
.cover-copy > .text-link { justify-self: end; font-size: 14px; white-space: nowrap; }
.cover-copy > .text-link:hover { color: inherit; }
.cover-copy > .text-link:hover .link-arrow { transform: translateX(4px); }
.cover-copy h1 a:focus-visible { text-decoration: underline; text-decoration-thickness: 1px; }

/* The masthead belongs to the photograph until it returns after scrolling. */
html[data-cover=photo] .is-home .ambient-field { display: none; }
html[data-cover=photo] .is-home .site-chrome:not(.is-scrolled) { --text: #fff; --secondary: #fff; color: #fff; }
html[data-cover=photo] .is-home .site-chrome:not(.is-scrolled) .globe { filter: invert(1); }
html[data-cover=photo] .is-home .site-chrome:not(.is-scrolled)::before,
html[data-cover=photo] .is-home .site-chrome:not(.is-scrolled)::after { display: none; }

/* 02 — an open spread: quiet type and a full-height photographic page. */
html[data-cover=split] .home-cover,
html[data-cover=poster] .home-cover {
  min-height: calc(100svh - var(--cover-header));
  margin-top: 0; padding-top: 0; background: transparent; color: var(--text);
}
html[data-cover=split] .cover-media::after { display: none; }
html[data-cover=split] .cover-media { left: 53%; }
html[data-cover=split] .cover-media img { object-position: 58% 50%; }
html[data-cover=split] .cover-inner { padding-block: 36px 88px; }
html[data-cover=split] .cover-edition { width: 45%; flex-direction: column; gap: 8px; }
html[data-cover=split] .cover-copy { width: 48%; grid-template-columns: 1fr; gap: 24px; }
html[data-cover=split] .cover-copy h1 { font-size: clamp(52px, 4.6vw, 80px); line-height: 1.03; text-wrap: pretty; }
html[data-cover=split] .cover-copy .lead { font-size: 18px; max-width: 420px; }
html[data-cover=split] .cover-copy > .text-link { justify-self: start; }

/* A small persistent modifier, separate from the journal's navigation. */
.cover-switch { display: none; }
:root[data-cover-ready] .cover-switch {
  display: flex; align-items: center; gap: 3px; padding: 5px;
  pointer-events: auto; border-radius: 3px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 4px 28px #0000000a;
  font-size: 12px; line-height: 18px;
}
.cover-switch button {
  display: flex; gap: 8px; align-items: center; min-height: 36px; padding: 6px 12px;
  color: var(--secondary); border-radius: 2px; transition: color .25s, background .25s;
}
.cover-switch button > span { font-size: 10px; font-variant-numeric: tabular-nums; }
.cover-switch button[aria-pressed=true] { color: var(--text); background: var(--surface); }
.cover-switch button:hover { color: var(--accent-text, var(--accent)); text-decoration: none; }
.cover-switch button:focus-visible { color: var(--accent-text, var(--accent)); text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 1024px) {
  html[data-layout=read] .is-home { --cover-header: 116px; }
  .is-home .edition-dock { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; }
  .is-home .edition-switch { justify-self: start; }
  .is-home .cover-switch { grid-column: 2; }
  .is-home .edition-contents { grid-column: 3; justify-self: end; }
}

/* One pause between sections; no empty bands framed by repeated rules. */
.is-home .home-flow { padding-top: 64px; }
.is-home .home-laboratory { border: 0; padding-block: 0; }
.catalog-flow { gap: 48px; }
.catalog-bar { border: 0; padding-block: 0; }
.catalog-bar + .catalog-grid { margin-top: -20px; }
.catalog-grid .story-card { border: 0; padding-top: 0; }
@media (min-width: 1024px) {
  html[data-layout=read] .is-home .home-flow { padding-top: 80px; gap: 80px; }
  html[data-layout=read] .is-home .home-laboratory { border: 0; padding-block: 0; }
  html[data-layout=read] .is-home .consult-banner { border: 0; padding-block: 0; }
  html[data-layout=read] .is-home .story-card.type-feature { border: 0; padding-top: 0; }
  html[data-layout=read] .catalog-flow { gap: 48px; }
  html[data-layout=read] .catalog-grid > .story-card { border: 0; padding-top: 0; }
}
@media (max-width: 1023px) {
  :root[data-cover-ready] .is-home .edition-dock {
    display: flex; justify-content: center; position: fixed; inset: auto 12px 12px;
    z-index: 60; pointer-events: none;
  }
  .is-home .edition-switch, .is-home .edition-contents { display: none; }
  .is-home .site-footer { padding-bottom: 88px; }
  .cover-inner { padding-bottom: 88px; }
  html[data-cover=split] .cover-copy h1 { font-size: clamp(40px, 5.2vw, 60px); }
}
@media (max-width: 760px) {
  .is-home { --cover-header: 88px; }
  .cover-inner { padding: 28px var(--margin) 88px; gap: 48px; }
  .cover-edition { font-size: 10px; line-height: 14px; gap: 20px; }
  .cover-edition > :first-child { max-width: 215px; }
  .cover-copy { grid-template-columns: 1fr; gap: 22px; }
  .cover-copy h1 { font-size: clamp(36px, 10.7vw, 70px); line-height: 1.02; letter-spacing: -.045em; }
  .cover-copy .meta { font-size: 11px; line-height: 16px; }
  .cover-copy .lead { font-size: 17px; line-height: 1.4; }
  .cover-copy > .text-link { justify-self: start; font-size: 12px; }
  .cover-media img { object-position: 65% 50%; }
  .cover-media::after { background: linear-gradient(180deg, #0006, #0002 25%, #10120fcc); }
  html[data-cover=split] .home-cover { grid-template-rows: auto minmax(240px, 36svh); }
  html[data-cover=split] .cover-inner { grid-row: 1; gap: 30px; padding-block: 20px 32px; }
  html[data-cover=split] .cover-media { position: relative; inset: auto; grid-row: 2; z-index: 0; }
  html[data-cover=split] .cover-edition { width: 100%; flex-direction: row; }
  html[data-cover=split] .cover-copy { width: 100%; gap: 20px; }
  html[data-cover=split] .cover-copy h1 { font-size: clamp(36px, 10vw, 62px); }
  html[data-cover=split] .cover-copy .lead { font-size: 17px; }
  .cover-switch button { padding: 7px 10px; gap: 6px; min-height: 38px; }
  .is-home .home-flow { padding-top: 44px; }
  .catalog-flow { gap: 32px; }
  .catalog-bar + .catalog-grid { margin-top: -8px; }
}
@media (min-width: 761px) and (max-height: 780px) {
  .cover-inner { gap: 28px; }
}
html:lang(zh-CN) .cover-copy h1 { line-height: 1.12; letter-spacing: -.025em; }
@media (prefers-reduced-motion: reduce) { .cover-switch button { transition: none; } }
@media print {
  .cover-switch { display: none !important; }
  .home-cover { min-height: 0; margin-top: 0; }
}

/* The photograph stays on the glass while the printed page moves above it.
   clip-path crops fixed descendants without turning them into absolute ones. */
@media screen and (prefers-reduced-motion: no-preference) {
  html[data-cover=photo][data-cover-motion] .home-cover {
    clip-path: inset(0); background: var(--paper);
  }
  html[data-cover=photo][data-cover-motion] .cover-media {
    position: fixed; inset: -40px;
    opacity: var(--cover-opacity, 1);
    filter: blur(var(--cover-blur, 0px));
    transform: translate3d(0, var(--cover-shift, 0px), 0) scale(var(--cover-scale, 1));
  }
  html[data-cover=photo][data-cover-motion] .home-cover:not([data-cover-offscreen]) .cover-media {
    will-change: transform, filter, opacity;
  }
  html[data-cover=photo][data-cover-motion] .home-cover[data-cover-offscreen] .cover-media { visibility: hidden; }
  html[data-cover=photo][data-cover-motion] .cover-inner { opacity: var(--cover-type-opacity, 1); }
  html[data-cover=photo][data-cover-motion] .home-cover:has(:focus-visible) :is(.cover-media, .cover-inner) { opacity: 1; }

  /* The opening has a rhythm: imprint, title, standfirst, reading invitation. */
  html[data-cover-enter] .cover-media img { animation: te-cover-develop 1.6s cubic-bezier(.16, 1, .3, 1) both; }
  html[data-cover-enter] .cover-edition { animation: te-cover-detail .9s .1s both; }
  html[data-cover-enter] .cover-copy > .meta { animation: te-cover-detail .9s .16s both; }
  html[data-cover-enter] .cover-copy h1 { animation: te-cover-title 1.15s cubic-bezier(.16, 1, .3, 1) .22s both; }
  html[data-cover-enter] .cover-copy > .lead { animation: te-cover-detail 1s .42s both; }
  html[data-cover-enter] .cover-copy > .text-link { animation: te-cover-detail 1s .56s both; }
  html[data-cover-enter=initial] .is-home .site-header > *,
  html[data-cover-enter=initial] .is-home .header-language { animation: te-cover-detail 1s .08s both; }
  html[data-cover-enter=initial] .is-home .edition-dock { animation: te-cover-detail .8s .72s both; }
}
@keyframes te-cover-title {
  from { opacity: 0; transform: translateY(36px); filter: blur(5px); clip-path: inset(0 0 100%); }
  to { opacity: 1; transform: none; filter: blur(0); clip-path: inset(-8% -2%); }
}
@keyframes te-cover-detail {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes te-cover-develop {
  from { transform: scale(1.045); filter: blur(4px); }
  to { transform: none; filter: blur(0); }
}

/* Rotation of three stories in the photographic cover: they take turns without any controls. */
.cover-sources { display: none; }
html[data-cover=photo] .cover-inner { gap: 32px; }
html[data-cover=photo] .cover-copy h1 { font-size: clamp(50px, 6.1vw, 102px); }
.cover-copy { transition: opacity .34s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.cover-copy.is-leaving { opacity: 0; transform: translateY(12px); }
.cover-media .cover-next { position: absolute; inset: 0; opacity: .35; clip-path: inset(0 0 0 100%); transform: translate3d(7%, 0, 0) scale(1.04); transition: clip-path 1.2s cubic-bezier(.77, 0, .18, 1), transform 1.6s cubic-bezier(.16, 1, .3, 1), opacity .9s ease .08s; animation: none !important; will-change: clip-path, transform; }
.cover-media .cover-next.is-in { opacity: 1; clip-path: inset(0); transform: none; }
/* the photograph underneath drifts aside and dims while the next one slides over it (2026-11-17) */
.cover-media img:not(.cover-next) { transition: transform 1.4s cubic-bezier(.65, 0, .35, 1), filter 1.4s ease; }
.cover-media img.is-out { transform: translate3d(-4%, 0, 0) scale(1.08); filter: brightness(.55); animation: none !important; }
.cover-media img.no-anim { transition: none !important; animation: none !important; }
@media (max-width: 760px) {
  html[data-cover=photo] .cover-copy h1 { font-size: clamp(34px, 10vw, 64px); }
}
@media (prefers-reduced-motion: reduce) { .cover-copy, .cover-media .cover-next, .cover-media img { transition: none !important; } .cover-media img.is-out { transform: none; filter: none; } }

/* While another story is being put in place for this visit, the first one is not shown. */
html[data-cover-turn]:not([data-cover-filled]) .home-cover :is(.cover-copy, .cover-media img) { visibility: hidden; }

/* The home page shown under the last page of /vypusk/ (/?under, public/flip.js): its own masthead and dock are hidden,
   the masthead of the flip page stands in for them until the real home page takes over. */
html[data-under] .site-chrome,
html[data-under] .skip-link,
html[data-under] .edition-dock,
html[data-under] .page-transition-veil { visibility: hidden !important; }

/* Four cover stories with a switch (2026-11-16, Max): the list stands in the bottom right corner, a section and a title per
   line; the active line has a ring that fills as its time runs out (public/cover-rotate.js). The photo and zoom covers carry it;
   the other layouts place their pieces themselves and keep one story. */
.cover-picks { display: none; }
@media (min-width: 761px) {
  html:is([data-cover=photo], [data-cover=zoom]) .cover-inner:has(.cover-picks) {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, min(560px, 40%)); align-items: end; align-content: end; column-gap: clamp(32px, 4vw, 80px);
  }
  html:is([data-cover=photo], [data-cover=zoom]) .cover-picks { display: grid; }
}
/* Phones (2026-11-17, the editors: «в мобильной версии убрать разделы … только заголовок и описание с переключением»):
   the list becomes a row of thin lines, one per story, the current one bright; a tap on a line switches. */
@media (max-width: 760px) {
  html:is([data-cover=photo], [data-cover=zoom]) .cover-picks { display: flex; gap: 6px; margin-top: 18px; }
  html:is([data-cover=photo], [data-cover=zoom]) .cover-picks li { flex: 1; }
  html:is([data-cover=photo], [data-cover=zoom]) .cover-picks a { display: block; height: 18px; padding: 0; position: relative; }
  html:is([data-cover=photo], [data-cover=zoom]) .cover-picks a::before { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 2px; border-radius: 1px; background: currentColor; opacity: .3; transition: opacity .3s; }
  html:is([data-cover=photo], [data-cover=zoom]) .cover-picks a[aria-current]::before { opacity: 1; }
  html:is([data-cover=photo], [data-cover=zoom]) .cover-picks :is(.cover-picks-section, .cover-picks-title) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.cover-picks { list-style: none; margin: 0; padding: 0; gap: 0; align-self: end; min-width: 0; }
.cover-picks a {
  display: grid; grid-template-columns: 8.5em minmax(0, 1fr); column-gap: 20px; align-items: baseline;
  padding-block: 9px; color: inherit; text-decoration: none; font-size: 17px; line-height: 1.3;
}
.cover-picks-section { position: relative; display: flex; align-items: center; gap: 8px; opacity: .72; }
.cover-picks-title { max-width: 22em; opacity: .72; transition: opacity .3s ease; }
.cover-picks a:is(:hover, :focus-visible) .cover-picks-title,
.cover-picks a[aria-current] :is(.cover-picks-title, .cover-picks-section) { opacity: 1; }
.cover-picks-timer { position: absolute; left: -20px; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; visibility: hidden; transform: rotate(-90deg); }
.cover-picks-timer circle:first-child { opacity: .3; }
.cover-picks a[aria-current] .cover-picks-timer { visibility: visible; }
.cover-picks .run { stroke-dasharray: 100; stroke-dashoffset: 0; }
.cover-picks.is-running a[aria-current] .run { animation: te-cover-timer var(--cover-duration, 7s) linear both; }
.cover-picks[data-paused] a[aria-current] .run { animation-play-state: paused; }
@keyframes te-cover-timer { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .cover-picks .run { animation: none !important; stroke-dashoffset: 0; } }
.cover-copy.is-leaving { transform: none; }
.cover-copy { transition: opacity .28s ease; }
@media (max-width: 1180px) and (min-width: 761px) {
  .cover-picks a { grid-template-columns: minmax(0, 1fr); font-size: 15px; padding-block: 7px; }
  .cover-picks-section { font-size: 12px; }
}
@media (max-width: 760px) {
  .cover-inner:has(.cover-picks) { gap: 28px; }
  .cover-picks { padding-left: 20px; }
  .cover-picks a { grid-template-columns: 6.5em minmax(0, 1fr); column-gap: 12px; padding-block: 6px; font-size: 14px; }
}

/* «Зум» (2026-11-17, Max: «в варианте зум главной надо поправить переключалки … белым лучше, снизу подкладывать чуть блюр
   градиентом и фейд в тёмный, на белом просто кнопками вытянутыми»). The four cover stories are long, thin buttons in the
   colour of the cover type (white on the photograph, ink once the photograph has moved away into the right half); on the
   photograph a blurred band that fades into dark lies under them and goes away with the photograph (--zp, variants.js). */
@media (min-width: 761px) {
  html[data-cover=zoom] .cover-inner:has(.cover-picks) { grid-template-columns: minmax(0, 1fr) minmax(0, min(420px, 34%)); }
  html[data-cover=zoom] .cover-picks { position: relative; align-self: end; gap: 8px; }
  html[data-cover=zoom] .cover-picks::before {
    content: ''; position: absolute; z-index: -1; pointer-events: none;
    /* 2026-11-17 later (Max: «фон убери на фулл, а не на фул добавь что-то»): over the full-screen photograph the list
       has no band under it; once the photograph has moved away into the right half the list sits on a glass plate of the
       paper, appearing with the move (--zp), so its lines read over the edge of the photograph */
    inset: -12px -14px; border-radius: 18px;
    background: color-mix(in srgb, var(--surface, #fff) 78%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--line, #d9dcdf) 70%, transparent), 0 18px 50px #0000001f;
    opacity: clamp(0, (var(--zp, 0) - .12) * 4, 1);
  }
  /* only the current story is a button: a capsule like the ask field (surface, blur, hairline, round ends); the others are
     plain lines whose outline shows faintly under the pointer (2026-11-17, Max) */
  html[data-cover=zoom] .cover-picks a {
    grid-template-columns: minmax(0, 1fr); row-gap: 2px; padding: 9px 18px 10px 34px; font-size: 15px; line-height: 1.25;
    border: 1px solid transparent; border-radius: 12px; background: none; transition: border-color .25s ease, background-color .25s ease, color .25s ease;
  }
  html[data-cover=zoom] .cover-picks a:is(:hover, :focus-visible):not([aria-current]) { border-color: color-mix(in srgb, currentColor 32%, transparent); }
  html[data-cover=zoom] .cover-picks a[aria-current] {
    color: var(--text, #121413); background: color-mix(in srgb, var(--surface, #fff) 86%, transparent); border-color: var(--line, #d9dcdf);
    -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 12px 44px #0000001f, 0 1px 3px #00000012;
  }
  html[data-cover=zoom] .cover-picks-section { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
  html[data-cover=zoom] .cover-picks-title { max-width: none; opacity: .78; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  html[data-cover=zoom] .cover-picks a[aria-current] :is(.cover-picks-title, .cover-picks-section) { opacity: 1; }
  html[data-cover=zoom] .cover-picks-timer { left: -21px; }
}

/* 2026-11-17 (a reader's video: «при наведении прыгает»): the copy of the cover changes height with each story; with the
   page scrolled a little, the browser kept the copy in place by moving the whole page (scroll anchoring), the pointer then
   stood over another line of the switch, and the cover kept switching. The cover is never an anchor. */
.home-cover, .home-cover * { overflow-anchor: none; }
