@font-face {
  font-family: 'Golos Text';
  src: url('assets/golos-cyr.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Golos Text';
  src: url('assets/golos-lat.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --ink: #111619;
  --deep: #0d1114;
  --surface: #191f23;
  --line: #394248;
  --text: #edf3f5;
  --muted: #b7c2c8;
  --accent: #a0d9ef;
  --accent-hover: #caeeff;
  --gutter: clamp(18px, 4.8vw, 70px);
  --bottom-space: 0px;
  scroll-behavior: smooth;
  scroll-padding-block: 12px calc(var(--bottom-space) + 12px);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding-bottom: var(--bottom-space); background: var(--ink); color: var(--text); font: 1rem/1.55 'Golos Text', Arial, sans-serif; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
a { color: inherit; text-underline-offset: .25em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(calc(100% - 2 * var(--gutter)), 1240px); margin-inline: auto; }
.skip-link { position: fixed; inset: 12px auto auto 12px; z-index: 5; clip-path: inset(50%); padding: 10px 14px; background: var(--accent); color: var(--deep); }
.skip-link:focus { clip-path: none; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 78px; gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; width: fit-content; font-size: 1.45rem; line-height: 1; letter-spacing: -.045em; font-weight: 800; text-decoration: none; }
.brand-mark { display: inline-block; position: relative; width: 22px; height: 15px; flex: none; margin-right: 5px; border: 2px solid var(--accent); border-radius: 12px 3px 12px 3px; transform: skewX(-14deg); }
.brand-mark::after { content: ''; position: absolute; top: 5px; left: 15px; width: 10px; height: 2px; background: var(--accent); box-shadow: 1px -5px var(--accent), -1px 5px var(--accent); }
.site-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); }
.site-nav a { display: flex; align-items: center; min-height: 43px; color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }
.header-phone { justify-self: end; color: var(--text); font-size: 1rem; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; text-decoration: none; }
.header-phone:hover, .contact-phone:hover { color: var(--accent); text-decoration: underline; }

.hero { background: var(--deep); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.23fr) minmax(0, 1fr); align-items: center; gap: clamp(18px, 4vw, 58px); padding-block: clamp(28px, 4vw, 54px); }
h1 { font-size: clamp(2.42rem, 4.65vw, 4.15rem); line-height: 1.02; font-weight: 770; letter-spacing: -.047em; }
h1 em { color: var(--accent); font-style: normal; white-space: nowrap; }
.hero-city { display: block; margin-top: .16em; font-size: .73em; line-height: 1.1; letter-spacing: -.04em; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.workshop-photo { width: 100%; height: auto; aspect-ratio: 1.32; object-fit: cover; object-position: 50% 62%; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; width: fit-content; padding: 10px 21px; border: 1px solid transparent; border-radius: 3px; line-height: 1.22; font-weight: 660; text-align: center; text-decoration: none; }
.primary { background: var(--accent); color: #0b1a22; }
.primary:hover { background: var(--accent-hover); }
.secondary { border-color: #82959f; background: var(--deep); color: var(--text); }
.secondary:hover { border-color: var(--accent); color: var(--accent); }

.page-section { padding-block: clamp(44px, 6.3vw, 86px); }
h2 { font-size: clamp(2.05rem, 4.35vw, 4.2rem); line-height: 1.03; letter-spacing: -.046em; font-weight: 750; }
.group-heading { font-size: clamp(1.22rem, 2.15vw, 1.7rem); line-height: 1.15; letter-spacing: -.036em; }
.optic-services { display: grid; grid-template-columns: minmax(0, .76fr) minmax(0, 1.24fr); gap: clamp(24px, 5vw, 70px); margin-top: clamp(24px, 3vw, 42px); }
.module-offer { align-self: start; background: var(--surface); }
.module-copy { padding: clamp(18px, 2.4vw, 32px); }
.module-copy p, .repair-menu > p { color: var(--muted); margin-top: 6px; }
.module-price { display: block; margin-top: 15px; color: var(--accent); font-size: clamp(1.65rem, 3vw, 2.65rem); line-height: 1; letter-spacing: -.04em; }
.module-offer img { width: 100%; height: auto; aspect-ratio: 2.8; object-fit: cover; object-position: 50% 46%; }
.price-list { margin-top: 18px; border-top: 1px solid var(--line); }
.price-list details { border-bottom: 1px solid var(--line); }
.optic-services summary, .service-groups summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding-block: 10px; list-style: none; cursor: pointer; }
.optic-services summary::-webkit-details-marker, .service-groups summary::-webkit-details-marker { display: none; }
.optic-services summary::after, .service-groups summary::after { content: ''; flex: none; width: 8px; height: 8px; margin-inline: 3px; border: solid var(--accent); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform 160ms ease; }
.optic-services details[open] > summary::after, .service-groups details[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.optic-services summary:hover, .service-groups summary:hover { color: var(--accent); }
.price-list summary { line-height: 1.35; }
.price-list summary strong { margin-left: auto; padding-left: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-list details p { padding: 0 0 12px; color: var(--muted); }
.service-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 0 clamp(24px, 5vw, 70px); margin-top: clamp(24px, 4vw, 48px); }
.service-groups > details { border-block: 1px solid var(--line); }
.service-groups summary { justify-content: space-between; min-height: 58px; font-size: 1.15rem; font-weight: 650; }
.service-list { margin-bottom: 8px; }
.service-list > div { display: grid; gap: 3px 14px; padding-block: 11px; border-bottom: 1px solid var(--line); }
.service-list > div:last-child { border: 0; }
.service-list dt { font-weight: 650; }
.service-list dd { color: var(--muted); }
@media (min-width: 1050px) { .service-list > div { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); } }

.work-section { background: var(--surface); border-block: 1px solid var(--line); }
.work-section > .wrap { max-width: 1110px; display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); align-items: center; gap: clamp(30px, 5vw, 66px) clamp(20px, 4vw, 55px); }
.work-section h2 { max-width: 11ch; }
.comparison { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 244px); align-items: center; gap: clamp(12px, 2vw, 26px); padding: clamp(14px, 2vw, 24px); background: var(--ink); border: 1px solid var(--line); }
.comparison-copy p { margin-top: 7px; color: var(--muted); font-size: .95rem; }
.comparison-photo { display: block; position: relative; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 1px solid var(--line); background: var(--deep); color: #fff; cursor: pointer; }
.comparison-photo:disabled { cursor: default; }
.comparison-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.comparison-photo .photo-after { opacity: 0; transition: opacity 210ms ease-out; }
.comparison-photo span { position: absolute; top: 12px; left: 12px; padding: 5px 12px; border: 1px solid #eff6f965; background: #111619ed; font-size: .875rem; font-weight: 700; }
.state-after, .comparison-photo[data-state='after'] .state-before { display: none; }
.comparison-photo[data-state='after'] .photo-after { opacity: 1; }
.comparison-photo[data-state='after'] .state-after { display: block; border-color: var(--accent); background: var(--accent); color: #0b1a22; }
.gallery-works { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line); }
.gallery-grid { --gallery-gap: clamp(11px, 1.9vw, 22px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gallery-gap); margin-top: 16px; }
.gallery-photo { display: block; position: relative; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--line); background: var(--deep); }
.gallery-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 230ms ease-out; }
@media (hover: hover) { .gallery-photo:hover img { transform: scale(1.045); } }
.gallery-viewer { max-width: min(820px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: clamp(11px, 2vw, 19px); border: 1px solid var(--line); background: var(--ink); color: var(--text); }
.gallery-viewer::backdrop { background: #06090be8; }
.gallery-viewer form { display: flex; justify-content: flex-end; margin-bottom: 11px; }
.gallery-viewer button { min-height: 40px; padding-inline: 13px; border: 1px solid #82959f; background: var(--deep); color: var(--text); cursor: pointer; }
.gallery-viewer button:hover { color: var(--accent); }
.gallery-viewer img { width: auto; height: auto; max-height: calc(100svh - 115px); object-fit: contain; }
body:has(.gallery-viewer[open]) { overflow: hidden; }

.reviews { border-bottom: 1px solid var(--line); }
.review-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 20px; }
.review-heading a { color: var(--accent); font-size: .95rem; }
.review-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 44px); margin-top: clamp(22px, 3vw, 40px); }
.review-list figure { padding-top: 16px; border-top: 1px solid var(--line); }
.review-list figcaption { font-weight: 700; }
.review-list time { display: block; margin-top: 2px; font-size: .875rem; font-weight: 400; color: var(--muted); }
.stars { display: inline-block; margin-block: 7px; color: var(--accent); font-size: .875rem; letter-spacing: .13em; }
.review-list blockquote { margin: 0; font-size: clamp(1rem, 1.35vw, 1.18rem); line-height: 1.47; }

.contacts { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(20px, 6vw, 75px); align-items: center; }
.contact-details { font-style: normal; margin-top: 18px; color: var(--text); }
.contact-details p + p { margin-top: 7px; }
.contact-phone { display: inline-block; font-size: clamp(1.38rem, 2.45vw, 1.85rem); font-weight: 700; letter-spacing: -.026em; text-decoration: none; }
.route-button { margin-top: 21px; }
.map-link { margin-top: 14px; color: var(--muted); }
.map-link a:hover { color: var(--accent); }
.map { display: block; width: 100%; height: clamp(300px, 29vw, 390px); border: 1px solid var(--line); background: var(--surface); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; min-height: 67px; padding-block: 10px; }
.mobile-actions { display: none; }

@media (max-width: 900px) {
  .work-section > .wrap { grid-template-columns: minmax(0, 1fr); }
  .work-section h2 { max-width: none; }
  .gallery-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gallery-photo { grid-column: span 2; }
  .gallery-photo:nth-child(4) { grid-column: 2 / span 2; }
}

@media (max-width: 740px) {
  :root { --bottom-space: calc(65px + env(safe-area-inset-bottom)); }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 0 11px; padding-top: 11px; }
  .brand { font-size: 1.22rem; }
  .header-phone { display: flex; min-height: 38px; align-items: center; font-size: .95rem; }
  .site-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 7px; padding-inline: 1px; }
  .site-nav a { min-height: 41px; font-size: .94rem; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 25px; padding-block: 37px 31px; }
  .workshop-photo { aspect-ratio: 1.55; max-height: 265px; object-position: 50% 69%; }
  h1 { font-size: clamp(2.22rem, 9.1vw, 4rem); }
  .actions { margin-top: 19px; }
  .optic-services, .service-groups, .review-list, .contacts { grid-template-columns: minmax(0, 1fr); }
  .module-offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30%); }
  .module-offer img { height: 100%; aspect-ratio: auto; }
  .service-groups > details + details { border-top: 0; }
  .review-list { gap: 20px; }
  .review-list figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .map { height: 320px; }
  .mobile-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 9px; position: fixed; z-index: 4; inset: auto 0 0; height: var(--bottom-space); padding: 8px max(var(--gutter), env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left)); border-top: 1px solid var(--line); background: var(--ink); }
  .mobile-actions .button { width: 100%; min-height: 44px; padding: 8px 10px; }
}

@media (max-width: 540px) {
  .comparison { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .comparison-photo { max-width: 290px; justify-self: center; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-photo, .gallery-photo:nth-child(4) { grid-column: auto; }
  .gallery-photo:last-child { grid-column: 1 / -1; width: calc((100% - var(--gallery-gap)) / 2); justify-self: center; }
}

@media (max-width: 390px) {
  .footer-inner { flex-wrap: wrap; align-content: center; gap: 3px 15px; }
  .button { padding-inline: 15px; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .site-nav a { position: relative; }
  .site-nav a::after {
    content: '';
    position: absolute;
    inset: auto 0 5px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease-out;
  }
  .site-nav a:is(:hover, :focus-visible)::after { transform: scaleX(1); }
  .button, .gallery-viewer button { transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease; }
  .button:is(:hover, :focus-visible), .gallery-viewer button:is(:hover, :focus-visible) { transform: translateY(-2px); }
  .button:active, .gallery-viewer button:active { transform: translateY(0); }
  .price-list summary span { transition: transform 180ms ease; }
  .price-list summary:is(:hover, :focus-visible) span { transform: translateX(4px); }
  .review-heading a, .map-link a, .footer-inner a { transition: text-underline-offset 160ms ease, color 160ms ease; }
  :is(.review-heading, .map-link, .footer-inner) a:is(:hover, :focus-visible) { text-underline-offset: .42em; color: var(--accent-hover); }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .comparison-photo .photo-after, .gallery-photo img, .optic-services summary::after, .service-groups summary::after { transition: none; }
  .gallery-photo:hover img { transform: none; }
}
