:root {
  --red: #e11f27;
  --red-dark: #b9151c;
  --ink: #2b2a28;
  --black: #161514;
  --paper: #ffffff;
  --grey: #f3f3f2;
  --line: #dcdcda;
  --muted: #6a6966;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1, h2 { font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
h3 { font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }

/* Кнопки */
.btn {
  display: inline-block;
  padding: 16px 34px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 700 14px/1 var(--font);
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--red); color: var(--paper); }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { border-color: var(--black); color: var(--black); }
.btn--ghost:hover { background: var(--black); color: var(--paper); }

/* Шапка */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.header.is-scrolled { box-shadow: 0 6px 20px rgba(22, 21, 20, .1); }
.header__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 88px; }
.logo { display: block; line-height: 0; }
.logo img { height: 72px; width: auto; }
.nav { display: flex; gap: 34px; }
.nav a {
  padding: 6px 0;
  border-bottom: 3px solid transparent;
  font-size: 14px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
}
.nav a:hover { border-color: var(--red); }
.header__actions { display: flex; align-items: center; gap: 16px; }
.header__phone { font-weight: 700; text-decoration: none; white-space: nowrap; }
.header__phone:hover { color: var(--red); }

.burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 10px; }
.burger span { display: block; height: 3px; margin: 5px 0; background: var(--ink); transition: transform .25s, opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Баннер */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; padding-block: 64px 72px; }
.hero h1 { font-size: clamp(30px, 4vw, 50px); }
.hero h1 span { color: var(--red); }
.hero__text > p { margin-top: 22px; max-width: 48ch; font-size: 18px; color: var(--muted); }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 16px 40px; margin-top: 44px; padding-top: 26px; border-top: 2px solid var(--black); font-size: 14px; color: var(--muted); }
.hero__facts strong { display: block; color: var(--black); font-size: 17px; font-weight: 800; }
.arch {
  display: flex; align-items: center; justify-content: center;
  width: min(440px, 100%); aspect-ratio: 1 / .82; margin-inline: auto;
  border: 18px solid var(--red); border-bottom: 0;
  border-radius: 999px 999px 0 0;
}
.arch img { display: block; width: 58%; height: auto; mix-blend-mode: multiply; }

/* Секции */
.section { padding-block: 84px; }
.section--tint { background: var(--grey); }
.section--dark { background: var(--black); color: var(--paper); }
.section__head { margin-bottom: 40px; }
.section__head h2, .contacts h2 { font-size: clamp(24px, 3vw, 36px); }
.section__head h2::after { content: ""; display: block; width: 56px; height: 5px; margin-top: 14px; background: var(--red); }
.section__head p { margin-top: 14px; color: var(--muted); }
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Категории */
.cat {
  position: relative; display: flex; flex-direction: column;
  min-height: 230px; padding: 28px 26px 24px;
  border: 2px solid var(--black); border-radius: 22px;
  background: var(--paper); color: var(--ink); text-decoration: none;
  transition: background .2s, color .2s;
}
.cat::before, .cat::after {
  content: ""; position: absolute; right: 26px; width: 10px; height: 10px; border-radius: 50%; background: var(--red);
}
.cat::before { top: 26px; }
.cat::after { top: 46px; }
.cat__name { font-size: 24px; font-weight: 800; text-transform: uppercase; }
.cat__text { margin-top: 10px; color: var(--muted); font-size: 15px; transition: color .2s; }
.cat__more { margin-top: auto; padding-top: 20px; color: var(--red); font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.cat:hover { background: var(--black); color: var(--paper); }
.cat:hover .cat__text { color: #c9c8c5; }

/* Как мы работаем */
.feature { padding: 26px 24px; border-top: 5px solid var(--red); background: var(--paper); }
.feature h3 { font-size: 18px; margin-bottom: 10px; text-transform: uppercase; }
.feature p { color: var(--muted); font-size: 15px; }

/* Контакты */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contacts p { margin-top: 16px; color: #c9c8c5; max-width: 46ch; }
.contacts__list { margin-top: 28px; display: grid; gap: 10px; }
.contacts__list a { color: var(--red); font-weight: 700; text-decoration: none; }
.contacts__list a:hover { text-decoration: underline; }
.btn--light { border-color: var(--paper); color: var(--paper); }
.btn--light:hover { background: var(--paper); color: var(--black); }
.messengers { display: grid; gap: 14px; max-width: 420px; padding: 32px; border: 2px solid rgba(255, 255, 255, .25); border-radius: 22px; }
.messengers .btn { text-align: center; }
.contacts .messengers__title { margin: 0 0 6px; max-width: none; color: var(--paper); font-size: 18px; font-weight: 700; }

/* Подвал */
.footer { padding-block: 26px; background: #0e0d0d; color: #aaa9a6; font-size: 14px; border-top: 4px solid var(--red); }
.footer__row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--paper); }

/* Планшеты */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .hero__grid { grid-template-columns: 1fr; padding-block: 44px 52px; }
  .hero__art { order: -1; }
  .arch { width: min(320px, 100%); border-width: 14px; }
  .contacts { grid-template-columns: 1fr; gap: 36px; }
}

/* Телефоны */
@media (max-width: 760px) {
  html { scroll-padding-top: 76px; }
  .header__row { height: 76px; gap: 12px; }
  .header__actions { gap: 6px; }
  .header__phone { font-size: 14px; }
  .logo img { height: 60px; }
  .burger { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 76px;
    flex-direction: column; gap: 0; padding: 4px 20px 14px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .section { padding-block: 56px; }
}
@media (max-width: 380px) {
  .header__phone { font-size: 13px; }
  .logo img { height: 52px; }
}
@media (max-width: 560px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .cat { min-height: 190px; }
  .messengers { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* Портфолио */
.page-head { padding-block: 44px 8px; }
.crumbs { margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.page-head h1 { font-size: clamp(32px, 4.4vw, 54px); }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tab {
  padding: 12px 22px; border: 2px solid var(--black); border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.tab:hover { background: var(--black); color: var(--paper); }
.tab.is-active { background: var(--red); border-color: var(--red); color: var(--paper); }
.portfolio { padding-top: 40px; }
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.shot { margin: 0; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: var(--grey); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot__ph {
  height: 100%; display: grid; place-items: center;
  border: 2px dashed var(--line); border-radius: 22px;
  color: var(--muted); font-size: 14px; font-weight: 600;
}
.cta__row { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(22px, 2.6vw, 30px); }
.cta p { margin-top: 10px; color: #c9c8c5; }
@media (max-width: 960px) { .gallery__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery__grid { grid-template-columns: 1fr; } .tab { padding: 10px 16px; } }

/* Фото и просмотр по клику */
.no-scroll { overflow: hidden; }
.shot__btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shot__btn img { transition: transform .4s; }
.shot__btn:hover img { transform: scale(1.04); }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 84px; background: rgba(14, 13, 13, .94);
}
.lightbox__figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox__figure img { display: block; max-width: min(100%, 1200px); max-height: calc(100vh - 150px); width: auto; height: auto; border-radius: 14px; }
.lightbox__cap { max-width: 70ch; color: #d6d5d2; font-size: 14px; text-align: center; }
.lightbox__count { position: absolute; top: 28px; left: 28px; margin: 0; color: #d6d5d2; font-size: 14px; font-weight: 600; }
.lightbox__close, .lightbox__nav {
  position: absolute; display: grid; place-items: center; width: 52px; height: 52px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: var(--paper);
  font-size: 30px; line-height: 1; cursor: pointer; transition: background .2s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: var(--red); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
@media (max-width: 760px) {
  .lightbox { padding: 68px 12px 84px; }
  .lightbox__figure img { max-height: calc(100vh - 220px); }
  .lightbox__nav { top: auto; bottom: 18px; transform: none; width: 46px; height: 46px; }
  .lightbox__nav--prev { left: calc(50% - 58px); }
  .lightbox__nav--next { right: calc(50% - 58px); }
}
