/* ==========================================================================
   АНКОМ — blocks shared by the home page and the service pages (remont-fotoaparativ, remont-droniv):
   section head, 3D colour/outline toggle buttons, «Як проходить ремонт», «Зв’язок з майстром», FAQ, guide (long-form SEO copy), models accordion.
   Loaded before the page stylesheet. Accordion behaviour: js/blocks.js.
   ========================================================================== */

/* ---------- Section head ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 44px;
}
.section-head .eyebrow { margin-bottom: 14px; }
.section-head--end { align-items: flex-end; }

/* ---------- 3D colour / outline toggle: buttons (the container is positioned by the page) ---------- */
.story__mode-btn {
  --pad-y: 7px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: var(--pad-y) 13px;
  background: none;
  border: 0;
  border-radius: 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.2s, background-color 0.2s;
}
.story__mode-label { display: block; }
/* mono capitals sit above the middle of their line box: trim the label to the cap height, so align-items: center
   puts the capitals — and the dot next to them — exactly in the middle of the pill; the padding grows by what was
   trimmed, so the pill keeps its height */
@supports (text-box: trim-both cap alphabetic) {
  .story__mode-label { text-box: trim-both cap alphabetic; }
  .story__mode-btn { padding-block: calc(var(--pad-y) + (1lh - 1cap) / 2); }
}
.story__mode-btn::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.45; }
.story__mode-btn:hover { color: var(--text-hi); }
.story__mode-btn[aria-pressed='true'] { color: var(--text-hi); background: var(--accent-soft); }
.story__mode-btn[aria-pressed='true']::before { background: var(--hot); opacity: 1; }

/* ---------- Process: six steps on a rail, like the header's instrument scale ----------
   js/blocks.js ties the rail to the scroll (.is-scrub): each stretch of the line fills with the scroll (--f 0…1),
   the mark at its start lights (spring pop + a fading square ping) the moment the line reaches it and the step's
   text rises in; scrolling back undoes it all in reverse. When the whole block fits under the header (≥ 768)
   the section becomes a scroll track (.is-pinned): the block holds on screen for --process-run of scroll while
   the rail runs. Phones and short screens scroll as usual, the rail following a reading line. Without JS or
   with reduced motion the rail is simply full. */
.process { --process-run: 180svh; padding-top: var(--section-y); padding-bottom: var(--section-y); border-top: 1px solid var(--line); }
.process.is-pinned { height: calc(100svh - var(--header-h) + var(--process-run)); padding-top: 0; padding-bottom: 0; }
.process.is-pinned .process__pin { position: sticky; top: var(--header-h); display: flex; flex-direction: column; justify-content: center; height: calc(100svh - var(--header-h)); }
.process__head { max-width: 760px; margin-bottom: 64px; }
.process .eyebrow { margin-bottom: 18px; }
.process .h2 { margin-bottom: 18px; }
.process__lead { max-width: 36em; font-size: var(--fs-base); font-weight: 450; line-height: 1.65; color: var(--text-3); }
.process__steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 56px; margin: 0; padding: 0; list-style: none; }
.step { position: relative; padding: 30px 28px 0 0; border-top: 1px solid var(--line-3); }
.step::after { content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: var(--accent); transform-origin: left; }
.step__mark { position: absolute; top: -5px; left: 0; z-index: 1; width: 9px; height: 9px; border: 1px solid var(--line-4); background: var(--bg); }
.step__mark::after { content: ''; position: absolute; inset: -1px; background: var(--hot); }
.step__mark::before { content: ''; position: absolute; inset: -13px; border: 1px solid var(--hot); opacity: 0; pointer-events: none; } /* drawn at its final size: the ping shrinks in, so the line stays 1 px */
@keyframes step-ping { from { opacity: 0.9; transform: scale(0.3); } to { opacity: 0; transform: scale(1); } }
.step__no { display: block; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--dim); }
.step__title { margin: 12px 0 10px; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xl); line-height: 1.3; color: var(--text-hi); text-wrap: balance; }
.step__text { font-size: var(--fs-md); font-weight: 450; line-height: 1.6; color: var(--text-3); text-wrap: pretty; }
/* scroll-driven states: the line has no transition (the scroll, smoothed in JS, is its timeline); the mark and
   the text switch with .is-on and animate by time — in with a pop and a stagger, out quicker and all at once */
.process.is-scrub .step::after { transform: scaleX(var(--f, 0)); }
.process.is-scrub .step__mark::after { transform: scale(0); transition: transform 0.2s var(--ease-out); }
.process.is-scrub .step.is-on .step__mark::after { transform: none; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); } /* overshoots: a small pop */
.process.is-scrub .step.is-on .step__mark::before { animation: step-ping 0.9s var(--ease-out) forwards; } /* forwards only: hidden until it plays */
.process.is-scrub .step__no,
.process.is-scrub .step__title,
.process.is-scrub .step__text { opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out); }
.process.is-scrub .step.is-on .step__no,
.process.is-scrub .step.is-on .step__title,
.process.is-scrub .step.is-on .step__text { opacity: 1; transform: none; transition-duration: 0.6s; transition-delay: calc(0.08s + var(--c, 0) * 0.07s); } /* text follows its mark */
.step__title { --c: 1; }
.step__text { --c: 2; }
@media (max-width: 1179.98px) {
  .process__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .process__head { margin-bottom: 44px; }
  .process__steps { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .step { padding: 0 0 36px 30px; border-top: 0; border-left: 1px solid var(--line-3); }
  .step:last-child { padding-bottom: 0; border-left-color: transparent; }
  .step::after { top: 0; bottom: 0; left: -1px; right: auto; width: 1px; height: auto; transform-origin: top; }
  .step:last-child::after { display: none; }
  .process.is-scrub .step::after { transform: scaleY(var(--f, 0)); }
  .step__mark { top: 4px; left: -5px; }
  .step__title { margin-top: 6px; }
}

/* ---------- «Зв’язок з майстром» (end of the home and service pages; replaced the request form 2026-09-30) ----------
   Nothing to fill in: the call, the messengers and the address in one viewfinder card; the status line under
   the lead is live (motion.js, [data-open-status]). Viber / Telegram / mail rows — .contact-links (sections.css). */
.reach {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.reach__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: center;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.reach .eyebrow { margin-bottom: 18px; }
.reach .h2 { margin-bottom: 18px; }
.reach__lead { max-width: 440px; margin-bottom: 28px; font-size: var(--fs-base); font-weight: 450; line-height: 1.7; color: var(--muted); }
/* flat card framed like a camera viewfinder: hairline border + accent corner marks, no shadow */
.reach__card {
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 44px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg);
}
.reach__group { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.reach__label { /* = .contact-card__title on the contacts page */
  display: flex;
  align-items: baseline; /* + the icon shift below: its centre on the capitals */
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--muted);
}
.reach__label svg { flex-shrink: 0; color: var(--accent); translate: 0 calc(8px - 0.36em); translate: 0 calc(8px - 0.5cap); }
.reach__phones { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.reach__nums { display: flex; flex-direction: column; gap: 4px; }
.reach__phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-3xl);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-hi);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.reach__phone2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.reach__phone:hover,
.reach__phone2:hover { color: var(--hot); }
.reach__call { padding: 14px 26px; font-size: var(--fs-md); }
.reach__where { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 28px; }
.reach__address { font-style: normal; font-size: var(--fs-base); line-height: 1.6; color: var(--text); }
.reach__route {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.reach__route svg { flex-shrink: 0; translate: 0 calc(6px - 0.5ex); } /* centred on the lowercase (the label is almost all lowercase; on the capitals it looks high) */
.reach__route path { transform-origin: 50% 50%; transition: rotate 0.35s cubic-bezier(0.45, 0, 0.2, 1); } /* ↗ → →, as .contact-link__arrow */
.reach__route:hover { color: var(--hot); }
@media (hover: hover) and (pointer: fine) {
  .reach__route:hover path { rotate: 45deg; }
}

/* ---------- FAQ (same wording as the FAQPage JSON-LD) ---------- */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px 80px;
  align-items: start;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  border-top: 1px solid var(--line);
}
.faq__head { position: sticky; top: calc(var(--header-h) + 40px); }
.faq .eyebrow { margin-bottom: 18px; }
.faq .h2 { margin-bottom: 18px; }
.faq__lead { margin-bottom: 14px; font-size: var(--fs-base); line-height: 1.6; color: var(--text-3); }
.faq__phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-2xl);
  color: var(--text-hi);
  text-decoration: none;
  transition: color 0.2s;
}
.faq__phone:hover { color: var(--hot); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:first-child { border-top: 1px solid var(--line); }
.faq__q {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__num { flex: 0 0 auto; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--dim); transition: color 0.2s; }
.faq__text {
  flex: 1 1 auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  line-height: 1.35;
  color: var(--text-hi);
}
/* plus → minus: the vertical bar folds away (transform only); shared with the models accordion */
.faq__icon,
.models__icon { position: relative; flex: 0 0 14px; width: 14px; height: 14px; align-self: center; }
.faq__icon::before,
.faq__icon::after,
.models__icon::before,
.models__icon::after {
  content: '';
  position: absolute;
  left: 0;
  top: 6.25px;
  width: 14px;
  height: 1.5px;
  background: var(--accent);
  transition: transform 0.2s var(--ease-out);
}
.faq__icon::after,
.models__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::after,
.models__item[open] .models__icon::after { transform: rotate(0deg); }
.faq__item.is-closing .faq__icon::after,
.models__item.is-closing .models__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__num,
.faq__q:hover .faq__num { color: var(--hot); }
/* open/close motion lives in home.js (accordion): the item's height tweens, the answer fades in parallel */
.faq__a {
  max-width: 38em; /* ≈ 70 characters inside the padding */
  padding: 0 32px 24px 38px;
  font-size: var(--fs-base);
  font-weight: 450;
  line-height: 1.7;
  color: var(--text-3);
}
/* keyboard toggles stay instant (home.js sets .is-instant) */
.faq__item.is-instant .faq__icon::after { transition: none; }

/* ---------- Guide: long-form answers under a sticky head (same grid as the FAQ). The SEO copy of a page
   reads as advice: each .guide__item = one H3 topic (a group of search queries) and its paragraphs. ---------- */
.guide {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px 80px;
  align-items: start;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  border-top: 1px solid var(--line);
}
.guide__head { position: sticky; top: calc(var(--header-h) + 40px); }
.guide .eyebrow { margin-bottom: 18px; }
.guide .h2 { margin-bottom: 18px; }
.guide__lead { max-width: 36em; font-size: var(--fs-base); font-weight: 450; line-height: 1.6; color: var(--text-3); }
.guide__item { padding: 28px 0; border-bottom: 1px solid var(--line); }
.guide__item:first-child { padding-top: 0; }
.guide__title { margin-bottom: 12px; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); line-height: 1.3; color: var(--text-hi); }
.guide__item p { max-width: 38em; font-size: var(--fs-base); font-weight: 450; line-height: 1.7; color: var(--text-3); }
.guide__item p + p { margin-top: 12px; }
.guide__item a { color: var(--text-hi); text-decoration-color: var(--accent); text-underline-offset: 3px; transition: color 0.2s; }
.guide__item a:hover { color: var(--hot); }

/* ---------- Models we repair: visible section, one <details> per brand (real HTML text, indexed).
   Open/close motion = FAQ (home.js accordion); each model is listed once. ---------- */
.models { padding-top: var(--section-y); padding-bottom: var(--section-y); border-top: 1px solid var(--line); }
.models__head { max-width: 760px; margin-bottom: 48px; }
.models .eyebrow { margin-bottom: 18px; }
.models .h2 { margin-bottom: 18px; }
.models__lead { max-width: 36em; font-size: var(--fs-base); line-height: 1.6; color: var(--text-3); }
.models__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 48px; align-items: start; }
.models__col-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--accent);
}
.models__item { border-bottom: 1px solid var(--line); }
.models__col-title + .models__item { border-top: 1px solid var(--line); }
.models__brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
}
.models__brand::-webkit-details-marker { display: none; }
.models__name {
  flex: 1 1 auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-base);
  line-height: 1.35;
  color: var(--text-hi);
}
.models__count { flex: 0 0 auto; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--dim); transition: color 0.2s; }
.models__item[open] .models__count,
.models__brand:hover .models__count { color: var(--hot); }
.models__panel { padding: 0 0 18px; }
.models__item.is-instant .models__icon::after { transition: none; }
.models__list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.models__list li {
  padding: 5px 9px;
  font-size: var(--fs-sm);
  line-height: 1.3;
  color: var(--text-3);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.models__note,
.models__col-note { margin-top: 12px; font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1023.98px) {
  .story__mode-btn { --pad-y: 6px; padding-inline: 10px; }
  .faq,
  .guide { grid-template-columns: 1fr; gap: 28px; }
  .models__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq__head,
  .guide__head { position: static; }
  .reach__inner { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 767.98px) {
  .models__head { margin-bottom: 32px; }
  .models__cols { grid-template-columns: 1fr; gap: 32px; }
  .faq__q { gap: 12px; padding: 18px 0; }
  .faq__text { font-size: var(--fs-base); }
  .faq__a { padding: 0 0 20px 30px; font-size: var(--fs-md); }
  .guide__item { padding: 22px 0; }
  .guide__item p { font-size: var(--fs-md); }
  .section-head { margin-bottom: 32px; }
  .reach__card { gap: 30px; padding: 28px 20px; }
  .reach__call { width: 100%; }
}
