/* Client brand «Авто Фэмили» (00-intake/materials/client-2026-10-29, 29.10.2026):
   logo = cyan + black/white mark, cyan #00CCFF (sampled from the logo files). Cyan fills carry ink text
   (white on #00CCFF is unreadable); text accents on white use a deeper cyan for contrast. */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&display=swap');

:root, html[data-c] {
  --brand: #00CCFF; --brand-hover: #00B6E8; --brand-ink: #0B0F14;
  --accent: #0079A6; --accent-hover: #00658B; --accent-soft: #E0F7FF;
}

/* Logo: mark + wordmark */
.logo { gap: 10px; text-transform: none; letter-spacing: 0; }
.logo__mk img { width: 40px; height: 40px; display: block; object-fit: contain; }
.logo__mark { display: none; }
.logo__txt { font-family: 'Montserrat', var(--font); font-weight: 800; font-size: 18px; line-height: 1; letter-spacing: .01em; color: var(--brand-ink); white-space: nowrap; }
.logo__txt b { color: var(--brand); font-weight: 800; }
.logo__txt small { display: block; margin-top: 4px; font-family: var(--font); font-size: 10px; font-weight: 500; letter-spacing: .32em; color: var(--steel); text-transform: lowercase; }
.logo--light .logo__txt { color: #fff; }
.logo--light .logo__txt small { color: rgba(255,255,255,.6); }

/* Brand cyan fills with ink text */
.btn--main, .btn--dark { background: var(--brand); color: var(--brand-ink); }
.btn--main:hover, .btn--dark:hover { background: var(--brand-hover); }
.search__box { box-shadow: 0 0 0 2px var(--brand); }
.hero--photo .search__box { box-shadow: 0 0 0 2px var(--brand), 0 14px 40px rgba(0,0,0,.35); }
.symp__list button.is-on { background: var(--brand); color: var(--brand-ink); }
.step__n { background: var(--brand); color: var(--brand-ink); }
.tile--all, .deck .tile--all { background: var(--brand); }
.tile--all:hover, .deck .tile--all:hover { background: var(--brand-hover); }
.tile--all h3, .tile--all .tile__p { color: var(--brand-ink) !important; }
.tile--all .go { background: var(--brand-ink); color: var(--brand); }
.offer__k, .fact--accent, .phero:not(.phero--plain) .fact--accent { background: var(--brand); color: var(--brand-ink); }
.final__list li::before { box-shadow: inset 0 0 0 5px var(--accent-soft), inset 0 0 0 8px var(--brand); }
.mbar .btn--main { background: var(--brand); color: var(--brand-ink); }
.okmark circle { fill: var(--brand); }
.okmark path { stroke: var(--brand-ink); }
.hero--photo .hero__alt { color: #fff; }
.loc__map svg circle:first-of-type { fill: var(--brand); }

/* Hero: one photo, everything centred (client 29.10: «убрать слайдер, оставить первое фото, инфу по центру») */
.hero--center { min-height: min(86vh, 800px); display: flex; flex-direction: column; justify-content: center; }
.hero--center .hero__bg { height: 100%; }
.hero--center::after { height: 100%; background: linear-gradient(rgba(10,14,22,.70), rgba(10,14,22,.58) 55%, rgba(10,14,22,.74)); }
.hero--center .hero__in { min-height: 0; align-items: center; text-align: center; padding-top: 72px; padding-bottom: 72px; }
.hero--center .hero__kicker { margin-bottom: 18px; }
.hero--center .hero__h1 { max-width: 18ch; margin: 0 auto; }
.hero--center .hero__lead { margin: 18px auto 0; max-width: 620px; }
.hero--center .search { margin: 32px auto 0; max-width: 760px; }
.hero--center .chips { justify-content: center; margin-left: auto; margin-right: auto; }
@media (max-width: 599px) { .hero--center .chips { justify-content: flex-start; } }

/* Phones of the three services */
.plines { display: grid; gap: 6px; margin-top: 8px; }
.pline { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; font-size: 15px; }
.pline span { min-width: 92px; color: var(--steel); }
.pline a { font-weight: 700; color: var(--ink); white-space: nowrap; }
.pline a:hover { color: var(--accent); }
.ftr .pline span { color: rgba(255,255,255,.55); }
.ftr .pline a { color: #fff; font-weight: 500; }
.ftr__addr .pline { font-size: 14px; }

/* «Почему выбирают нас» */
.why5 { display: grid; gap: 16px; }
@media (min-width: 700px) { .why5 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .why5 { grid-template-columns: repeat(5, 1fr); } }
.why5__i { padding: 24px; border-radius: 20px; background: var(--mist); display: grid; gap: 8px; align-content: start; }
.section--mist .why5__i { background: #fff; }
.why5__n { font-family: 'Montserrat', var(--font); font-weight: 800; font-size: 28px; color: var(--brand); }
.why5__i h3 { font-size: 18px; font-weight: 700; }
.why5__i p { color: var(--steel); font-size: 15px; }

/* Logo images (client file) */
.logo__h { height: 44px; width: auto; display: block; }
.logo__full { width: 150px; height: auto; display: block; }
@media (max-width: 479px) { .logo__h { height: 36px; } }

/* Fixes 29.10: final band text readable over the photo */
.final--photo .final__bg { opacity: 1; }
.final--photo::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(10,14,22,.92), rgba(10,14,22,.78) 45%, rgba(10,14,22,.45)); }
.final--photo .container { z-index: 1; }
@media (max-width: 999px) { .final--photo::before { background: rgba(10,14,22,.82); } }

/* Fixes 29.10: phone — direction cards one per row, titles no longer cut */
@media (max-width: 599px) {
  .deck { grid-template-columns: 1fr; }
  .deck .tile, .deck .tile--wide { grid-column: auto; min-height: 200px; }
  .deck .tile h3, .deck .tile--wide h3 { font-size: 22px; }
}
.deck .tile h3 { overflow-wrap: break-word; hyphens: manual; }

/* layering of the final band: photo 0 < shade 1 < content 2 */
.final--photo .final__bg { z-index: 0; }
.final--photo::before { z-index: 1; }
.final--photo .container { z-index: 2; }

/* ===== Round 3 (29.10): «Почему выбирают нас», reviews links, home deck of all directions, motion ===== */
.whyx { display: grid; gap: 16px; }
@media (min-width: 1100px) { .whyx { grid-template-columns: 360px 1fr; align-items: stretch; } }
.whyx__stats { display: grid; gap: 24px; align-content: center; padding: 36px 32px; border-radius: 20px; background: #0B0F14; color: #fff; }
.whyx__stats div { display: grid; gap: 4px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.12); }
.whyx__stats div:last-child { border-bottom: 0; padding-bottom: 0; }
.whyx__stats b { font-family: 'Montserrat', var(--font); font-size: 52px; line-height: 1; font-weight: 800; color: var(--brand); }
.whyx__stats span { color: rgba(255,255,255,.75); font-size: 16px; }
.whyx__grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .whyx__grid { grid-template-columns: 1fr 1fr; } }
.whyx__i { padding: 28px; border-radius: 20px; background: var(--mist); display: grid; grid-template-columns: 64px 1fr; gap: 6px 20px; align-content: start; transition: transform .3s var(--ease), box-shadow .3s; }
.section--mist .whyx__i { background: #fff; }
.whyx__i:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.08); }
.whyx__i img { grid-row: span 2; width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.whyx__i h3 { font-size: 20px; font-weight: 700; line-height: 1.25; }
.whyx__i p { color: var(--steel); font-size: 15px; line-height: 1.5; }
.why5 { display: none; }

.revs__links { display: grid; gap: 16px; }
@media (min-width: 760px) { .revs__links { grid-template-columns: 1fr 1fr; } }
.revlink { display: grid; gap: 6px; padding: 28px; border-radius: 20px; background: var(--mist); transition: transform .3s var(--ease), background .2s; }
.revlink b { font-size: 22px; font-weight: 700; }
.revlink span { color: var(--steel); }
.revlink::after { content: "Открыть отзывы →"; margin-top: 10px; color: var(--accent); font-weight: 500; }
.revlink:hover { transform: translateY(-4px); background: var(--accent-soft); }

/* home: all directions — 4 columns, two wide tiles */
@media (min-width: 900px) { .deck { grid-template-columns: repeat(4, 1fr); } .deck .tile { min-height: 240px; } }

/* motion */
.anim .a-settle { animation: aSettle 2.4s cubic-bezier(.2,.7,.2,1) both; }
@keyframes aSettle { from { transform: scale(1.08); } to { transform: scale(1); } }
.anim .a-rise { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.anim .a-rise.is-in { opacity: 1; transform: none; }
.anim .a-head { opacity: 0; transform: translateX(-24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.anim .a-head.is-in { opacity: 1; transform: none; }
.anim .a-wipe { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s cubic-bezier(.65,0,.35,1), transform .8s ease; }
.anim .a-wipe.is-in { clip-path: inset(0 0 0 0); }
.btn--main { transition: background .2s, transform .2s var(--ease), box-shadow .2s; }
.btn--main:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,204,255,.35); }
.chip { transition: background .2s, transform .2s var(--ease); }
.chip:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .btn--main:hover, .chip:hover, .whyx__i:hover, .revlink:hover { transform: none; } }

/* no mockup notes on the pages */
.todo { display: none !important; }
mark.var { background: none; color: inherit; padding: 0; }

.deck .tile--wide h3, .deck .tile h3 { max-width: none; }
.pcard__list li a { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pcard__list li a b { white-space: nowrap; color: var(--ink); font-weight: 700; }
.pcard__list li a:hover span { color: var(--accent); }

/* ===== Review fixes 30.10.2026 (Desktop/review.md, R001–R023) ===== */
/* R019: grey text reaches 4.5:1 on #F3F4F6 */
:root, html[data-c] { --steel: #545B67; }
/* R003: typed text in the light search field is dark (hero sets white text) */
.search__input, .hero--photo .search__input { color: var(--ink); -webkit-text-fill-color: var(--ink); caret-color: var(--ink); }
.search__input::placeholder { color: #6B7280; -webkit-text-fill-color: #6B7280; }
.res a { color: var(--accent); }
/* R002: mobile / tablet menu */
.hdr__in { position: relative; }
@media (max-width: 1099px) {
  .hdr.is-menu .hdr__nav { display: flex; flex-direction: column; gap: 0; position: absolute; left: 0; right: 0; top: calc(100% + 1px); margin: 0;
    background: #fff; padding: 8px 16px 16px; border-radius: 0 0 16px 16px; box-shadow: 0 18px 40px rgba(11,15,20,.16); z-index: 60; }
  .hdr.is-menu .hdr__nav a { padding: 14px 8px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .hdr.is-menu .hdr__nav a:last-child { border-bottom: 0; }
  .hdr.is-menu .hdr__burger { background: var(--brand); }
}
/* R016: visible labels, field borders, errors */
.fld { display: grid; gap: 6px; min-width: 0; }
.fld__l { font-size: 14px; font-weight: 500; color: var(--ink); }
.fld__l span { color: #B3261E; }
.field { width: 100%; min-width: 0; background: #fff; border: 1px solid #B9C0CA; }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: 0; }
.field[aria-invalid] { border-color: #B3261E; }
.form__err { color: #B3261E; font-size: 14px; line-height: 1.4; }
.form__err a { color: inherit; text-decoration: underline; font-weight: 600; }
.form .btn[disabled] { opacity: .7; cursor: progress; }
.ftr .form__err { color: #FFB4AB; }
/* R007: dialog fits 320 px */
.modal { padding: 12px; }
.modal__box { width: 100%; max-width: min(480px, 100%); min-width: 0; max-height: calc(100dvh - 24px); overflow-y: auto; }
.modal__box .btn { white-space: normal; text-align: center; }
@media (max-width: 479px) { .modal__box { padding: 24px 18px; } .modal__x { top: 8px; right: 8px; } .modal__box .h3 { font-size: 24px !important; padding-right: 44px; } }
/* R009: real maps + route */
.loc__map iframe, .bigmap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.loc__more { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 500; }
/* R008: review links without an unsourced rating */
.revs { display: block; }
/* R020: phone links easy to tap */
.pline a { display: inline-block; padding: 8px 0; min-height: 24px; }
.plines { gap: 0; }
.ftr .pline { gap: 0 18px; }
/* R012: minimum price names its work */
.tile__p small { display: block; margin-top: 2px; font-size: 13px; opacity: .85; }
/* R023: price categories as a select on phones */
.pcat-sel { display: none; }
@media (max-width: 767px) { .pcat-sel { display: block; margin-top: 16px; } .pcat-chips { display: none !important; } }
/* Search results inside the photo hero inherit white text — keep them dark on the white list (30.10) */
.search__list, .hero--photo .search__list .res, .search__list .res > div { color: var(--ink); }
.search__list .res .price, .hero--photo .search__list .price { color: var(--ink); }
.search__list .res small { color: var(--steel); }
.search__list .res--empty { color: var(--steel); }
/* Search results go over the next section: the hero no longer clips, the photo is clipped by its own frame (30.10) */
.hero--center { overflow: visible; z-index: 5; }
.hero--center > picture { position: absolute; inset: 0; overflow: hidden; display: block; z-index: 0; }
.hero--center > picture .hero__bg { height: 100%; }
.hero--center::after { z-index: 0; }
.hero--center .hero__in { z-index: 2; }
.hero--center .search { position: relative; z-index: 10; }

/* Branch contacts and client workshop media. */
.topbar__in { min-height: 40px; height: auto; }
.topbar__branches { display: flex; flex-wrap: wrap; column-gap: 28px; }
.topbar__branch { display: flex; flex-wrap: wrap; column-gap: 9px; align-items: center; padding-block: 4px; }
.topbar__address { text-decoration: underline; text-underline-offset: 3px; }
.topbar__tel, .branch-phone { font-weight: 700; }
.topbar__tel, .topbar__address { color: var(--ink); white-space: nowrap; }
.topbar__tel:hover, .topbar__address:hover { text-decoration: underline; }
.hero--workshop .hero__in { align-items: flex-start; text-align: left; }
.hero--workshop .hero__h1, .hero--workshop .hero__lead, .hero--workshop .search, .hero--workshop .chips { margin-inline: 0; }
.hero--workshop .search { max-width: 570px; }
.hero--workshop .chips { justify-content: flex-start; max-width: 560px; }
.hero--workshop::after { background: linear-gradient(90deg, rgba(10,14,22,.85), rgba(10,14,22,.61) 38%, rgba(10,14,22,.12) 82%); }
.hero--workshop .hero__bg { object-position: 72% 50%; }
.maintenance { background: var(--mist); }
.maintenance__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 6vw, 84px); }
.maintenance__layout > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 47%; border-radius: 16px; }
.maintenance__body .lead { margin-top: 16px; }
.maintenance__price { margin: 20px 0; font-size: clamp(24px, 4vw, 38px); font-weight: 800; }
.maintenance__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.service-steps { list-style: none; padding: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service-video { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(20px, 4vw, 54px); margin-top: 32px; }
.service-video video { width: min(100%, 270px); aspect-ratio: 9 / 16; border-radius: 12px; background: #161a21; object-fit: contain; }
.service-video p { margin-top: 10px; }
.prow__note { display: block; margin-top: 4px; color: var(--steel); }
.review-location h2 { scroll-margin-top: 96px; }
@media (max-width: 767px) {
  .topbar__branches { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .topbar__branch { display: grid; gap: 1px; padding-block: 5px; }
  .topbar__in > span { display: none; }
  .hero--workshop::after { background: rgba(10,14,22,.73); }
  .hero--workshop .hero__in { padding-block: 45px; }
  .maintenance__layout { grid-template-columns: minmax(0, 1fr); }
  .maintenance__body { grid-row: 1; }
  .maintenance__layout > img { max-height: 340px; }
  .service-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .service-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .hero--workshop .chips { max-width: 100%; }
}

.service-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2.4vw, 32px);
}
.service-gallery figure { min-width: 0; margin: 0; }
.service-gallery figure > a { display: block; }
.service-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--mist);
}
.service-gallery figcaption { margin-top: 9px; font-weight: 600; }
.service-gallery figcaption a { text-decoration: underline; text-underline-offset: 3px; }
.workshop-story {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 5vw, 64px);
}
.workshop-story video {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 500px;
  object-fit: contain;
  border-radius: 12px;
  background: #161a21;
}
.workshop-story__body .lead { margin: 14px 0 24px; }
@media (max-width: 850px) {
  .workshop-story { grid-template-columns: minmax(0, 1fr); }
  .workshop-story__body { grid-row: 1; }
  .workshop-story video { width: min(100%, 300px); }
}
@media (max-width: 600px) {
  .service-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-gallery figcaption { font-size: .9rem; }
}

#services .maintenance {
  margin-bottom: clamp(20px, 3vw, 36px);
  padding: clamp(16px, 3vw, 32px);
  border-radius: 16px;
  background: #fff;
}
#services .maintenance__layout { gap: clamp(20px, 4vw, 56px); }

.work-mosaic { gap: clamp(8px, 1.25vw, 18px); }
.work-mosaic figure { min-width: 0; min-height: 0; }
.work-mosaic figure > a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: var(--mist);
  cursor: zoom-in;
}
.work-mosaic figure > a:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.work-mosaic img { height: 100%; border-radius: 0; }
@media (prefers-reduced-motion: no-preference) {
  .work-mosaic img { transition: transform .25s ease; }
  .work-mosaic a:is(:hover, :focus-visible) img { transform: scale(1.045); }
}
@media (min-width: 601px) {
  .work-mosaic { grid-auto-rows: clamp(130px, 17vw, 240px); }
  .work-mosaic:has(figure:nth-child(6)) figure:nth-child(6n + 1) {
    grid-column: span 2;
    grid-row: span 2;
  }
}
@media (max-width: 600px) {
  .work-mosaic img { height: auto; }
  .work-mosaic:has(figure:nth-child(6)) figure:is(:first-child, :last-child) { grid-column: 1 / -1; }
  .work-mosaic:has(figure:nth-child(6)) figure:is(:first-child, :last-child) img { aspect-ratio: 16 / 10; }
}

.photo-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: clamp(42px, 7vw, 72px) clamp(42px, 8vw, 96px);
  background: rgba(10, 14, 22, .97);
  color: white;
  overflow: hidden;
}
.photo-viewer[open] { display: grid; place-items: center; }
body:has(.photo-viewer[open]) { overflow: hidden; }
.photo-viewer > img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; pointer-events: none; }
.photo-viewer button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff66;
  border-radius: 50%;
  background: #262c36;
  color: white;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.photo-viewer button[hidden] { display: none; }
.photo-viewer button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.photo-viewer__close { top: 12px; right: 12px; }
.photo-viewer__previous, .photo-viewer__next { top: 50%; transform: translateY(-50%); }
.photo-viewer__previous { left: 8px; }
.photo-viewer__next { right: 8px; }
.photo-viewer__count { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); }
