/* Particle fields: section mastheads, service blocks and interludes. Drawn by particles.js. */
.te-field { position: relative; pointer-events: none; }
.te-field canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.page-intro.has-field { position: relative; isolation: isolate; min-height: clamp(240px, 26vw, 380px); justify-content: flex-end; }
.intro-field { position: absolute; z-index: -1; right: 0; top: -32px; bottom: -32px; width: min(44%, 600px); }
.interlude { height: clamp(240px, 34vw, 480px); border-block: 1px solid var(--line); }
.interlude .te-field { height: 100%; }
.error-field { height: clamp(200px, 26vw, 360px); max-width: 720px; }
.consulting-teaser { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 32px; }
.teaser-field { height: clamp(320px, 42vw, 600px); }
.ultra-field { position: absolute; z-index: -1; right: 2%; top: 8px; width: 40%; height: clamp(170px, 19vw, 280px); }
.ultra-head { grid-template-columns: minmax(0, 1fr); }
.ultra-head .lead { justify-self: start; }
.ultra::before { opacity: .55; }
@media (max-width: 900px) {
  .page-intro.has-field { min-height: 0; }
  .intro-field { position: relative; inset: auto; width: 100%; height: 190px; order: -1; margin-bottom: -8px; }
  .consulting-teaser { grid-template-columns: 1fr; }
  .teaser-field { height: 300px; order: -1; }
  .ultra-field { width: 100%; height: 240px; opacity: .7; }
}
@media print { .te-field, .interlude { display: none !important; } }
/* Particles behind the interactive diagrams; the drawing stays on top. */
.diagram-art { position: relative; isolation: isolate; }
.diagram-field { position: absolute; inset: 0; z-index: -1; opacity: .75; }

/* ULTRA: one particle creative for the home promo and the page. */
.ultra { --ultra-pad: clamp(28px, 4vw, 64px); padding: var(--ultra-pad); }
.ultra-hero { position: relative; min-height: clamp(320px, 40vw, 600px); display: grid; align-content: end; }
.ultra-hero .ultra-field { position: absolute; inset: calc(var(--ultra-pad) * -1); width: auto; height: auto; right: calc(var(--ultra-pad) * -1); top: calc(var(--ultra-pad) * -1); z-index: -1; opacity: 1; }
.ultra-hero .ultra-head { grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 46%; }
.ultra-hero .ultra-head .text-link { justify-self: start; color: inherit; }
.ultra::before { display: none; }

/* About: a scroll story. The field stays on screen while the chapters pass over it. */
.about-story { position: relative; }
.story-field { position: sticky; top: 0; height: 100svh; margin-top: -40px; }
.story-chapters { position: relative; margin-top: -100svh; padding-bottom: 12svh; }
.story-chapter { min-height: 112svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: clamp(28px, 3.2vw, 48px); max-width: none; }
.story-chapter:first-child { min-height: 88svh; }
.story-chapter > * { max-width: min(54%, 820px); }
.story-chapter h1 { font-size: clamp(52px, 6.8vw, 124px); line-height: .98; letter-spacing: -.05em; }
.story-chapter h2 { font-size: clamp(44px, 5.4vw, 96px); line-height: 1; letter-spacing: -.045em; }
.story-chapter .lead { font-size: clamp(22px, 2.15vw, 34px); line-height: 1.42; max-width: min(48%, 700px); }
.story-chapter .story-statement { font-family: 'ONY Lavr', Arial, sans-serif; font-weight: 300; font-size: clamp(28px, 3.3vw, 54px); line-height: 1.16; letter-spacing: -.03em; max-width: min(54%, 820px); }
html[data-font]:not([data-font=ony]) .story-statement { font-family: inherit; }
.story-links { display: grid; gap: 0; width: 100%; }
.story-links a { display: grid; gap: 10px; padding: clamp(18px, 2vw, 30px) 0; border-top: 1px solid var(--line); color: inherit; }
.story-links a:hover { text-decoration: none; }
.story-links a:hover h3 { color: var(--accent-text, var(--accent)); }
.story-links h3 { font-size: clamp(28px, 3vw, 46px); line-height: 1.05; letter-spacing: -.03em; transition: color .3s; }
.story-links p { font-size: clamp(15px, 1.2vw, 18px); line-height: 1.45; color: var(--secondary); max-width: 520px; }
.story-end { min-height: 70svh; }
[data-words] .story-word {
  display: inline-block;
  --w: clamp(0, calc((var(--p, 1) * (var(--n, 1) + 4) - var(--i, 0)) / 4), 1);
  opacity: calc(.1 + var(--w) * .9);
  transform: translateY(calc((1 - var(--w)) * .32em));
  filter: blur(calc((1 - var(--w)) * 3px));
}
@media (max-width: 900px) {
  .ultra-hero { min-height: 420px; }
  .ultra-hero .ultra-head { max-width: none; }
  .ultra-hero .ultra-field { opacity: .55; }
  .story-field { opacity: .3; }
  .story-chapter > *, .story-chapter .lead, .story-chapter .story-statement { max-width: none; }
  .story-chapter { min-height: 86svh; }
}
@media print { .story-field { display: none; } .story-chapters { margin-top: 0; } }

/* Consulting: a quiet heading, one paragraph and the simplest form. */
.consulting-copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.consulting-copy h1 { font-size: clamp(34px, 3.4vw, 52px); line-height: 1.06; letter-spacing: -.03em; max-width: 620px; }
.consulting-copy .lead { max-width: 560px; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; }
.consulting-form { width: 100%; max-width: 520px; margin-top: 16px; display: grid; gap: 18px; }
.consulting-form label { display: grid; gap: 6px; font-size: 13px; line-height: 18px; color: var(--secondary); }
.consulting-form :is(input, textarea) { font-size: 18px !important; line-height: 26px !important; color: var(--text); }
.consulting-form .button { min-width: 0; }

/* Topics as shelves: every story stands on its topic's shelf as a magazine cover. */
.shelves { display: grid; }
.shelf { position: relative; display: grid; grid-template-columns: minmax(170px, 22%) minmax(0, 1fr); gap: 32px; align-items: end; padding-top: clamp(36px, 4.4vw, 72px); border-bottom: 2px solid var(--text); }
.shelf::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 16px; margin-top: 2px; background: linear-gradient(color-mix(in srgb, var(--text) 13%, transparent), transparent); pointer-events: none; }
.shelf-label { align-self: start; padding-bottom: 20px; color: inherit; }
.shelf-label h2 { font-size: clamp(24px, 2.4vw, 38px); line-height: 1.04; letter-spacing: -.03em; transition: color .3s; }
.shelf-label:hover { text-decoration: none; }
.shelf-label:hover h2 { color: var(--accent-text, var(--accent)); }
.shelf-row { display: flex; gap: clamp(10px, 1.2vw, 20px); align-items: flex-end; overflow-x: auto; padding: 18px 4px 0; scrollbar-width: none; }
.shelf-row::-webkit-scrollbar { display: none; }
.mag { flex: 0 0 auto; width: clamp(118px, 12.5vw, 188px); color: #fff; transform-origin: bottom center; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.mag:nth-child(3n+2) { width: clamp(104px, 11vw, 166px); }
.mag:nth-child(4n+3) { width: clamp(128px, 13.6vw, 204px); }
.mag-cover { position: relative; display: block; aspect-ratio: 3/4; overflow: hidden; background: #17191C; border-radius: var(--r-s, 0); box-shadow: 0 -1px 0 #ffffff24 inset, 6px 0 14px -8px #00000059; }
.mag-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.16, 1, .3, 1); }
.mag-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #0000005c, transparent 34%, transparent 46%, #000000b8); }
.mag-cover.is-type { background: var(--accent); }
.mag-cover.is-type::after { display: none; }
.mag-mast { position: absolute; z-index: 1; left: 10px; top: 11px; }
.mag-mast svg { display: block; width: clamp(26px, 2.6vw, 38px); height: auto; fill: #fff; filter: none; animation: none; }
.mag-title { position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 11px; font-family: 'ONY Lavr', Arial, sans-serif; font-size: clamp(11px, 1.02vw, 15.5px); line-height: 1.12; letter-spacing: -.01em; }
.mag-cover.is-type .mag-title { font-size: clamp(14px, 1.4vw, 21px); }
html[data-font]:not([data-font=ony]) .mag-title { font-family: inherit; }
.mag:hover { text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .mag:hover { transform: translateY(-16px) rotate(-1.4deg); }
  .mag:hover img { transform: scale(1.06); }
}
@media (max-width: 760px) {
  .shelf { grid-template-columns: 1fr; gap: 6px; padding-top: 28px; }
  .shelf-label { padding-bottom: 0; }
  .mag { width: 124px; } .mag:nth-child(3n+2) { width: 112px; } .mag:nth-child(4n+3) { width: 134px; }
}
@media (prefers-reduced-motion: reduce) { .mag, .mag-cover img { transition: none; } }

/* The bridge mark on the magazine covers. */
html body .mag-mast svg[data-mark-variant=bridge] { width: clamp(44px, 4.4vw, 64px); aspect-ratio: 507 / 94; }

/* Inside the product screens and on the magazine covers only the chosen mark is shown. */
html body .screen-bar svg.mark-variant, html body .mag-mast svg.mark-variant { display: none; }
html[data-mark=bridge] body .screen-bar svg.mark-variant[data-mark-variant=bridge], html[data-mark=over] body .screen-bar svg.mark-variant[data-mark-variant=over], html[data-mark=axis] body .screen-bar svg.mark-variant[data-mark-variant=axis], html[data-mark=plus] body .screen-bar svg.mark-variant[data-mark-variant=plus], html[data-mark=cap] body .screen-bar svg.mark-variant[data-mark-variant=cap], html[data-mark=bridge] body .mag-mast svg.mark-variant[data-mark-variant=bridge], html[data-mark=over] body .mag-mast svg.mark-variant[data-mark-variant=over], html[data-mark=axis] body .mag-mast svg.mark-variant[data-mark-variant=axis], html[data-mark=plus] body .mag-mast svg.mark-variant[data-mark-variant=plus], html[data-mark=cap] body .mag-mast svg.mark-variant[data-mark-variant=cap],
html[data-mark=off] body .screen-bar svg.mark-variant[data-mark-variant=bridge], html[data-mark=off] body .mag-mast svg.mark-variant[data-mark-variant=bridge] { display: block; }

/* The masthead strip keeps a light shade so the mark reads on bright photographs. */
.mag-cover:not(.is-type) { background-image: none; }
.mag-mast::before { content: ''; position: absolute; z-index: -1; inset: -11px -40px -18px -12px; background: radial-gradient(ellipse at 20% 30%, #00000059, transparent 70%); pointer-events: none; }

/* Shelves as printed issues (2026-11-11): a spine and a block of pages give the cover volume,
   the lower part of the photograph is darkened and blurred so the title reads, and the title is set compactly. */
.shelf-row { padding: 26px 18px 2px 6px; perspective: 1400px; }
/* Flat on purpose: preserve-3d hides the photograph under the blurred layer in Chromium. */
.mag { transform: rotateY(-9deg); transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
.mag-cover {
  border-radius: 1px 3px 3px 1px;
  box-shadow:
    inset 5px 0 0 -1px #00000055, inset 6px 0 0 -1px #ffffff1f, inset 9px 0 10px -6px #0000004d,
    1px 1px 0 #f2f2ee, 2px 2px 0 #c9c9c4, 3px 3px 0 #ecece8, 4px 4px 0 #bdbdb8,
    12px 14px 22px -8px #00000073, 2px 3px 6px #00000033;
}
.mag-cover::before {
  /* The spine: a crease and a highlight along the binding. */
  content: ''; position: absolute; z-index: 2; inset: 0 auto 0 0; width: 10px; pointer-events: none;
  background: linear-gradient(90deg, #0000004d, #ffffff21 45%, #0000001f 70%, transparent);
}
.mag-cover::after {
  /* Only the lower part: darkened and blurred, fading in from the middle of the cover. */
  inset: 50% 0 0; background: linear-gradient(180deg, transparent, #00000080 40%, #000000c7);
  -webkit-backdrop-filter: blur(5px) saturate(.85); backdrop-filter: blur(5px) saturate(.85);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%); mask-image: linear-gradient(180deg, transparent, #000 60%);
}
.mag-title {
  left: 12px; right: 9px; bottom: 9px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden;
  font-size: clamp(10px, .82vw, 12.5px); line-height: 1.12; letter-spacing: -.005em; font-weight: 400; text-wrap: pretty;
  text-shadow: 0 1px 8px #00000080;
}
.mag-mast { left: 12px; }
@media (hover: hover) and (pointer: fine) {
  .mag:hover { transform: rotateY(-2deg) translateY(-14px); }
}
@media (max-width: 760px) { .mag-title { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .mag, .mag:hover { transform: none; } }

/* «Архив» (2026-11-17): issues of 1964–1992 on shelves, one per decade; the year and number on the issue, the title under it. */
.archive-shelves .mag-archive { margin: 0; flex: 0 0 auto; width: clamp(130px, 13vw, 190px); }
.archive-shelves .mag-archive figcaption { margin-top: 10px; font-size: 13px; line-height: 1.3; color: var(--secondary); }
.archive-shelves .mag-archive .mag-title { font-size: 13px; letter-spacing: .02em; }

/* «Разделы» in the «Индекс» layout: each section opens with its name and description, then its stories as large lines. */
.section-index { margin-top: clamp(40px, 6vw, 96px); }
.section-index-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 40px; align-items: end; padding-bottom: 16px; }
.section-index-head h2 { margin: 0; font-size: clamp(30px, 3.4vw, 56px); font-weight: 400; letter-spacing: -.035em; }
.section-index-head h2 a { color: inherit; }
.section-index-head h2 a:hover { color: var(--accent-text, var(--accent)); text-decoration: none; }
.section-index-head p { margin: 0; color: var(--secondary); max-width: 40em; }
@media (max-width: 760px) { .section-index-head { grid-template-columns: minmax(0, 1fr); } }

/* Legal pages (2026-11-17): a narrow reading column, numbered clauses as plain paragraphs. */
.legal-page { max-width: 820px; }
.legal-head h1 { font: 300 clamp(34px, 4.4vw, 60px)/1.02 'ONY Lavr', Arial, sans-serif; letter-spacing: -.02em; margin: 0 0 14px; }
.legal-head .lead { margin: 0 0 10px; }
.legal-head .meta a { color: inherit; }
.legal-body { margin-top: 40px; font-size: 17px; line-height: 1.55; }
.legal-body h2 { font: 400 22px/1.2 'ONY Lavr', Arial, sans-serif; margin: 40px 0 14px; }
.legal-body p { margin: 0 0 12px; }

/* «О проекте» (2026-11-17): the line of the journal large, the team as a list of roles and names. */
.about-page { max-width: 1100px; }
.about-head h1 { font: 300 clamp(40px, 6vw, 96px)/.95 'ONY Lavr', Arial, sans-serif; letter-spacing: -.03em; margin: 0 0 clamp(24px, 3vw, 44px); }
.about-lead { font: 300 clamp(22px, 2.4vw, 36px)/1.25 'ONY Lavr', Arial, sans-serif; max-width: 26em; margin: 0; }
.about-team { margin-top: clamp(48px, 7vw, 110px); }
.about-team h2 { font: 400 13px/1.2 'ONY One', Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--secondary, #5d6166); margin: 0 0 18px; }
.about-team dl { margin: 0; border-top: 1px solid var(--line, rgb(0 0 0 / .14)); }
.about-team dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line, rgb(0 0 0 / .14)); }
.about-team dt { color: var(--secondary, #5d6166); }
.about-team dd { margin: 0; font: 400 clamp(18px, 1.6vw, 24px)/1.2 'ONY Lavr', Arial, sans-serif; }
.about-links { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 40px; }

/* «Разделы» in the «Индекс» layout (2026-11-17, Max: «больше воздуху между статьями»): each story is a row with room
   above and below and a hairline between rows; more distance between the sections. */
html body .section-index .catalog-grid .story-card { padding-block: clamp(26px, 2.6vw, 44px) !important; border-bottom: 1px solid var(--line); }
html body .section-index .catalog-grid .story-card:last-child { border-bottom: 0; }
html body .section-index + .section-index { margin-top: clamp(72px, 9vw, 160px); }
