/* Jenko — home v8 prototype, over home-v7.css (owner, 2026-09-26 evening, looking on a laptop):
   « много пустого места сверху каждого экрана », larger words where there is room, the workshop's pictures each with its
   own fact and opened large, the request and the footer on one screen, a softer background, a smoother scroll.
   References (1470×746, the owner's laptop): section titles 42–74 px (Thirdway 64–74, List Holding 70, Driessen 62,
   Price & Pierce 52), text 16–22 px; warm light grounds (Thirdway #f7f1e9, Driessen #faf6f2, Somerville #fffcf5). */

/* ——— 1. The screens start near the top: past the opening the top bar has gone (rail mode), so its 72 px are not kept.
   Titles one size up, text one size up, as the references at the same window. Landscape screens only (the phone keeps
   v7 until the owner looks at it). ——— */
@media (min-width: 901px) and (min-aspect-ratio: 1/1) {
  main[data-top="rail"] .s5 { --pad-top: clamp(14px, 3svh, 36px); }
  .s5 {
    --step-3: clamp(2rem, min(4.1vw, 7.2svh), 4.5rem);
    --step-2: clamp(1.5rem, min(3vw, 5svh), 3.25rem);
    --step-1: clamp(1.125rem, min(1.6vw, 2.9svh), 1.875rem);
    --step-0: clamp(1rem, min(1.3vw, 2.45svh), 1.375rem);
    --step--1: clamp(0.8125rem, min(1vw, 1.85svh), 1.0625rem);
  }
  .s5__head { padding-top: clamp(10px, 1.6svh, 18px); column-gap: var(--gutter); }
  .s5__title { grid-column: 1 / span 8; line-height: 1; text-wrap: balance; }
  .s5__lead { grid-column: 9 / -1; gap: 8px; padding-top: 0.35em; }
  .s5__lead p { max-width: 44ch; }
  /* a link runs on after its sentence instead of taking a line of its own */
  .s5__lead p .link { display: inline-flex; margin-left: 6px; white-space: nowrap; }
}

/* ——— 2. The cabinet: the words beside the photo fill their column ——— */
.cab8__hint { font-size: var(--step--1); color: var(--ink-2); margin: 0 0 -8px; }
@media (min-width: 901px) and (min-aspect-ratio: 1/1) {
  .cab5__list button { font-size: var(--step-0); min-height: clamp(36px, 5.4svh, 52px); }
  .cab5__detail h3 { font-size: var(--step-2); line-height: 1.05; letter-spacing: -0.025em; }
  .cab5__detail p { font-size: var(--step-1); line-height: 1.4; max-width: 30ch; color: var(--ink); }
}
@media (max-width: 900px), (max-aspect-ratio: 1/1) { .cab8__hint { display: none; } }

/* ——— 3. The workshop: five pictures, each with its fact under it. Ribbon (default): a row wider than the screen that
   scrolls sideways; the next picture shows at the edge so the row reads as one to scroll. ——— */
.shop8 { grid-column: 1 / -1; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; row-gap: clamp(8px, 1.6svh, 16px); }
.shop8__list { --cap: calc(var(--step-2) * 1.05 + var(--step-0) * 1.4 * 2 + 18px);
  list-style: none; min-height: 0; display: flex; gap: var(--gutter); margin: 0 calc(-1 * var(--margin)); padding: 0 var(--margin);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--margin); scrollbar-width: none;
  container-type: size; cursor: grab; }
.shop8__list::-webkit-scrollbar { display: none; }
.shop8__list.is-drag { cursor: grabbing; scroll-snap-type: none; }
.shop8__list.is-drag .shop8__ph { pointer-events: none; }
.shop8__item { flex: 0 0 auto; width: min(58cqw, calc((100cqh - var(--cap)) * 16 / 10)); height: 100%; scroll-snap-align: start; }
.shop8__item figure { height: 100%; margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; }
.shop8__ph { position: relative; min-height: 0; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--stone); cursor: zoom-in; }
.shop8__ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.shop8__zoom { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgb(var(--shade) / 0.55); color: var(--on-photo); opacity: 0; transition: opacity var(--dur-s); }
.shop8__zoom svg { width: 18px; height: 18px; }
@media (hover: hover) { .shop8__ph:hover img { transform: scale(1.03); } .shop8__ph:hover .shop8__zoom { opacity: 1; } }
.shop8__ph:focus-visible .shop8__zoom { opacity: 1; }
.shop8__cap { display: grid; align-content: start; gap: 2px; padding-top: 8px; border-top: 1px solid var(--rule-strong); }
/* every caption takes the same height, so the pictures of the row share one height */
.shop8__list .shop8__cap { min-height: calc(var(--cap) - 7px); }
.shop8__n { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.shop8__t { font-size: var(--step-0); line-height: 1.4; color: var(--ink-2); max-width: 40ch; }
.shop8__nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.shop8__arrow { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--rule-strong); border-radius: 50%;
  background: none; color: var(--ink); cursor: pointer; transition: background-color var(--dur-s), color var(--dur-s); }
.shop8__arrow svg { width: 18px; height: 18px; }
.shop8__arrow:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.shop8__arrow:disabled { opacity: 0.35; cursor: default; }
.shop8__count { min-width: 3.5em; text-align: center; font-size: var(--step--1); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.shop8__film { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: var(--step--1); cursor: pointer; }
.shop8__film svg { width: 14px; height: 14px; }
/* phones and upright screens: the same row, a picture across most of the width */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .shop8__item { width: min(84cqw, calc((100cqh - var(--cap)) * 4 / 3)); }
  .s5-shop8 .s5__lead p { display: none; }
}

/* Stage (compare): one large picture on the left, the five facts as a list beside it; the chosen fact shows its picture */
@media (min-width: 901px) and (min-aspect-ratio: 1/1) {
  [data-v-shop="stage"] .shop8 { grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
  [data-v-shop="stage"] .shop8__list { grid-column: 1 / -1; grid-row: 1; display: grid; grid-template-columns: subgrid;
    grid-template-rows: repeat(5, auto) minmax(0, 1fr); margin: 0; padding: 0; overflow: visible; container-type: normal; cursor: auto;
    border-top: 1px solid var(--rule-strong); }
  [data-v-shop="stage"] .shop8__item, [data-v-shop="stage"] .shop8__item figure { display: contents; }
  [data-v-shop="stage"] .shop8__ph { grid-column: 1 / span 8; grid-row: 1 / -1; margin-top: -1px; opacity: 0; visibility: hidden;
    transition: opacity 360ms ease, visibility 0s 360ms; }
  [data-v-shop="stage"] .shop8__item.is-on .shop8__ph { opacity: 1; visibility: visible; transition: opacity 360ms ease; }
  [data-v-shop="stage"] .shop8__list .shop8__cap { min-height: 0; }
  [data-v-shop="stage"] .shop8__cap { grid-column: 9 / -1; padding: clamp(8px, 1.5svh, 14px) 0 clamp(11px, 1.9svh, 18px); border-top: 0; border-bottom: 1px solid var(--rule); cursor: pointer; }
  [data-v-shop="stage"] .shop8__cap .shop8__n { font-size: var(--step-1); color: var(--ink-2); transition: color var(--dur-s); }
  [data-v-shop="stage"] .shop8__cap .shop8__t { font-size: var(--step--1); }
  [data-v-shop="stage"] .shop8__cap[aria-pressed="true"] .shop8__n { font-size: var(--step-2); color: var(--ink); }
  [data-v-shop="stage"] .shop8__cap[aria-pressed="true"] .shop8__t { display: block; font-size: var(--step-0); color: var(--ink); }
  [data-v-shop="stage"] .shop8__cap:hover .shop8__n { color: var(--ink); }
  [data-v-shop="stage"] .shop8__cap:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
  [data-v-shop="stage"] .shop8__nav { grid-column: 9 / -1; grid-row: 2; justify-content: flex-start; }
}

/* The dialog: the picture as large as the window allows, its fact under it */
.lb8 { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(16px, 4svh, 48px) clamp(56px, 7vw, 120px);
  border: 0; background: rgb(var(--shade) / 0.94); color: var(--on-graphite); overflow: hidden; }
.lb8::backdrop { background: rgb(var(--shade) / 0.6); }
.lb8[open] { display: grid; }
.lb8__fig { min-height: 0; margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; justify-items: center; }
.lb8__fig img, .lb8__fig video { min-height: 0; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 2px; }
.lb8__fig video { width: min(100%, calc((100dvh - 180px) * 16 / 9)); }
.lb8__cap { width: min(100%, 1100px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 6px 18px; }
.lb8__n { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.02em; color: var(--on-graphite); }
.lb8__t { font-size: var(--step-0); color: var(--on-graphite-2); }
.lb8__count { font-size: var(--step--1); color: var(--on-graphite-2); font-variant-numeric: tabular-nums; }
.lb8__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgb(233 234 230 / 0.4);
  border-radius: 50%; background: rgb(var(--shade) / 0.5); color: var(--on-graphite); cursor: pointer; }
.lb8__btn svg { width: 20px; height: 20px; }
.lb8__btn:hover { background: var(--on-graphite); color: var(--graphite); }
.lb8__btn:focus-visible { outline: 2px solid var(--jaune); outline-offset: 3px; }
.lb8__prev { left: clamp(8px, 2vw, 32px); top: 50%; translate: 0 -50%; }
.lb8__next { right: clamp(8px, 2vw, 32px); top: 50%; translate: 0 -50%; }
.lb8__close { right: clamp(8px, 2vw, 32px); top: clamp(8px, 2vw, 32px); }
.lb8.is-film :is(.lb8__prev, .lb8__next) { display: none; }
@media (max-width: 600px) {
  .lb8 { padding: 64px 12px 16px; }
  .lb8__cap { grid-template-columns: 1fr; }
  .lb8__prev, .lb8__next { top: auto; bottom: 12px; translate: none; }
}

/* ——— 4. Clients: the link alone beside the title, the sample note one line under the testimonials ——— */
@media (min-width: 901px) and (min-aspect-ratio: 1/1) {
  .s5-refs7 .s5__lead { align-self: end; justify-items: end; padding-top: 0; }
  [data-v-refs="grid"] .refs7__avis { grid-template-rows: minmax(0, 1fr) auto; }
  [data-v-refs="grid"] .refs7__avis figure { grid-row: 1; }
  [data-v-refs="grid"] .refs7__note { grid-row: 2; grid-column: 1 / -1; font-size: var(--step--1); }
}

/* ——— 5. The request and the footer on one screen: a compact footer, the phone number larger ——— */
@media (min-width: 901px) and (min-aspect-ratio: 1/1) {
  .s5-fin { --step-4: clamp(2.5rem, min(4.6vw, 8.4svh), 5.25rem); }
  .fin7__tel a { font-size: var(--step-4); letter-spacing: -0.03em; line-height: 1; }
  .fin7 { row-gap: clamp(10px, 1.6svh, 24px); }
  .fin7__main { gap: clamp(10px, 2svh, 28px); }
  /* the hours ride beside the number */
  .fin7__tel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
  .fin7 .fin5__steps { gap: 6px; }
  .fin5__steps li { padding-block: clamp(3px, 0.6svh, 10px); }
  /* the footer in two lines: the logo, the solutions, Jenko and « back to top » in one row, the legal line under it */
  main[data-screens] + .footer .footer__grid { position: relative; padding-top: clamp(12px, 2svh, 20px); row-gap: 4px; align-items: start; }
  main[data-screens] + .footer .footer__brand { grid-column: 1 / span 3; gap: 8px; padding-top: 4px; }
  main[data-screens] + .footer .footer__brand svg { width: clamp(120px, 10vw, 170px); }
  main[data-screens] + .footer .footer__note { display: none; }
  main[data-screens] + .footer .footer__col h2 { margin-bottom: 2px; }
  main[data-screens] + .footer .footer__col :is(a, span) { min-height: 26px; }
  main[data-screens] + .footer .footer__col:nth-of-type(4) { grid-column: 4 / span 6; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  main[data-screens] + .footer .footer__col:nth-of-type(5) { grid-column: 10 / span 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main[data-screens] + .footer .footer__legal { margin-top: 4px; padding-top: 8px; align-items: center; }
  main[data-screens] + .footer .footer__top7 { position: absolute; right: 0; top: clamp(12px, 2svh, 20px); }
  main[data-screens] + .footer .footer__top7 i { width: 40px; height: 40px; }
}

/* ——— 6. The side tab floats a little off the window edge: macOS lays its scrollbar over the last 12 px ——— */
@media (min-width: 901px) and (min-aspect-ratio: 1/1) {
  .rail7 { right: 14px; }
  .rail7 > * { width: min(36px, calc(var(--margin) - 22px)); border-radius: 4px; }
  .rail7.is-on { transform: translate(0, -50%); }
  .rail7:not(.is-on) { transform: translate(calc(100% + 20px), -50%); }
}

/* ——— 7. Background to compare (<html data-v-bg>). warm — a warm light paper, as the references (default);
   stone — a deeper cool grey, no white; graphite — every screen dark, as the opening and the request; paper — v7. ——— */
html[data-v-bg="warm"] { --paper: #f1ede6; --paper-hi: #f8f6f1; --stone: #e2ddd4; --rule: rgb(38 34 28 / 0.16); --rule-strong: rgb(38 34 28 / 0.5); }
html[data-v-bg="stone"] { --paper: #dcdfdb; --paper-hi: #e7e9e5; --stone: #cdd1cc; --rule: rgb(22 24 27 / 0.18); --rule-strong: rgb(22 24 27 / 0.55); }
html[data-v-bg="graphite"] .s5:not(.s5-fin) {
  --paper: #2a2e32; --paper-hi: #33383d; --stone: #3b4046; --ink: #eceeea; --ink-2: #b4bac0;
  --rule: rgb(236 238 234 / 0.16); --rule-strong: rgb(236 238 234 / 0.45);
}
html[data-v-bg="graphite"] .s5-fin { --graphite: #1d2023; }
html[data-v-bg="graphite"] main[data-screens] + .footer { --graphite: #1d2023; }
/* the logos are drawn in one dark tone: on the dark ground they turn light */
html[data-v-bg="graphite"] :is(.refs7__group img, .refs7__main img) { filter: invert(1) brightness(0.92); }
html[data-v-bg="graphite"] .rail7__menu { background: var(--on-graphite); color: var(--graphite); }

/* the request screen gives the footer the room it needs: its own bottom padding goes (the footer follows), and on low
   laptop windows (1280×689, 1366×657) the sentence beside the title goes too — the form's labels say the same */
@media (min-width: 901px) and (min-aspect-ratio: 1/1) {
  .s5-fin .s5__in { padding-bottom: clamp(8px, 1.4svh, 20px); }
  main[data-screens] + .footer { padding-bottom: clamp(10px, 1.8svh, 20px); }
}
@media (min-width: 901px) and (min-aspect-ratio: 1/1) and (max-height: 720px) {
  .s5-fin .s5__lead { display: none; }
  .s5-fin { --step-4: clamp(2.25rem, min(4.6vw, 7.4svh), 5.25rem); }
}
