/* ── Шрифты ─────────────────────────────────── */
@font-face {
  font-family: "Lato Light";
  src: url("assets/fonts/Lato-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vetrino";
  src: url("assets/fonts/Vetrino.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── Переменные ─────────────────────────────── */
:root {
  --bg: #ffffff;
  --text: #2b2b2b;
  --text-soft: #6f6f6f;
  --line: #e6e6e6;
  --accent: #7c8460;        /* приглушённый оливково-зелёный */
  --accent-dark: #6a714f;
  --font: "Lato Light", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-title: "Vetrino", "Lato Light", "Segoe UI", sans-serif;
  --wrap: 1100px;
  --gap: clamp(64px, 10vw, 140px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* Заголовки блоков — крупнее, мягче */
.block-title {
  font-family: var(--font-title);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: normal;
  letter-spacing: 0.5px;
  margin-bottom: 32px;
}
.block-title--sans { font-family: var(--font); }

/* ── Появление при прокрутке ────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Кнопки-пилюли ──────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn--fill {
  background: var(--accent);
  color: #fff;
  border: 1.5px solid var(--accent);
}
.btn--fill:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--text);
}
.btn--outline:hover { background: var(--text); color: #fff; }

/* ── Навигация ──────────────────────────────── */
.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 48px);
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.nav a {
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
}
.nav a:hover { color: var(--accent); }
.nav a.is-active { color: var(--accent); }
.nav--sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  z-index: 10;
  transition: transform .35s ease;
}
.nav--hidden { transform: translateY(-100%); }
.nav__social, .nav__burger { display: none; }

/* ── Hero ───────────────────────────────────── */
.hero__img {
  width: 100%;
  height: 82vh;
  background-color: #ededed;
  background-image: url('assets/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
/* Приветственная анимация: фото повыше, подпись всплывает через 1с */
.hero .hero__img { height: 92vh; transition: height 1.1s ease; }
.hero .hero__caption { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1.1s ease; }
.hero.is-lifted .hero__img { height: 72vh; }
.hero.is-lifted .hero__caption { opacity: 1; transform: none; }
/* На мобильных background-attachment: fixed работает нестабильно — отключаем */
@media (max-width: 800px) {
  .hero__img,
  .hero .hero__img,
  .hero.is-lifted .hero__img {
    background-attachment: scroll;
    background-image: url('assets/hero-mobile.jpg');
    background-size: contain;
    height: auto;
    aspect-ratio: 1;
  }
}
.hero__caption {
  text-align: center;
  padding: 48px 24px;
}
.hero__role {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 12px;
}
.hero__name {
  font-family: var(--font-title);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: normal;
}

/* ── Заголовок внутренней страницы ──────────── */
.page-head {
  text-align: center;
  padding: clamp(56px, 8vw, 96px) 24px clamp(32px, 5vw, 56px);
}
.page-head__title {
  font-family: var(--font-title);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: normal;
  letter-spacing: 0.5px;
}
.page-head__sub {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 14px;
  color: var(--text-soft);
  margin-top: 12px;
}

/* ── Обо мне ────────────────────────────────── */
.about { padding: clamp(40px, 6vw, 80px) 0; }
.about__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}
.about__photo--round {
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  background: #ededed;
  width: 100%;
}
.about__photo--rect {
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #ededed;
  width: 100%;
}
.about__text p { margin-bottom: 14px; color: var(--text-soft); }
.about__text p:first-child { color: var(--text); }

/* ── Разделитель ────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
}
.divider span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.divider::before, .divider::after {
  content: ""; height: 1px; width: min(160px, 20vw); background: var(--line);
}

/* ── Услуги (анонс на главной) ──────────────── */
.service { padding: clamp(40px, 6vw, 80px) 0; }
.service__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: clamp(32px, 5vw, 72px);
}
.service__text { display: flex; flex-direction: column; }
.service__img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: #ededed;
}
.service__text p { color: var(--text-soft); margin-bottom: 16px; }
.service__buttons { display: flex; flex-wrap: nowrap; gap: 16px; margin-top: auto; padding-top: 28px; }
.service__buttons .btn { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; }
.service--mirror .service__media { order: 2; }

/* ── Портфолио (галерея) ────────────────────── */
.gallery {
  padding: 0 0 clamp(28px, 3.5vw, 48px);
}
.page-head--tight { padding-bottom: clamp(16px, 2.5vw, 28px); }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px);
}
.work__img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: #ededed;
}
.work__caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(255, 255, 255, .8);
  color: var(--text-soft);
  padding: 6px 14px;
  font-size: 15px;
  letter-spacing: .3px;
}

/* ── Страница проекта портфолио ─────────────── */
.project {
  text-align: center;
  padding: clamp(8px, 1.5vw, 16px) 0 clamp(32px, 5vw, 56px);
}
.project__desc {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-soft);
}
.project__gallery {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: clamp(48px, 7vw, 88px);
}
.project__gallery img {
  width: 100%;
  border-radius: 4px;
  background: #ededed;
}
.project__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
}
.project__row--2 { grid-template-columns: 1.375fr 0.748fr; align-items: start; }
.project__row--2 img { width: 100%; height: auto; display: block; }
.project__row figure { margin: 0; }
.project__row figcaption {
  margin-top: 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--text-soft);
}
@media (max-width: 800px) {
  .project__row { grid-template-columns: 1fr; }
}
.project__gallery img { cursor: zoom-in; }

/* Лента страниц (концепции / коллажи / чертежи) */
.docs {
  background: #f4f4f2;
  padding: clamp(48px, 7vw, 88px) 0;
}
.docs__head {
  text-align: center;
  margin-bottom: clamp(24px, 4vw, 40px);
}
.carousel { position: relative; }
.carousel__track {
  display: flex;
  gap: clamp(12px, 2vw, 20px);
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -ms-overflow-style: none;
  scrollbar-width: thin;
}
.carousel__track img {
  height: clamp(240px, 40vh, 420px);
  width: auto;
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-radius: 4px;
  background: #ededed;
  cursor: zoom-in;
}
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  background: rgba(255, 255, 255, .9);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background .2s, color .2s;
}
.carousel__btn:hover { background: var(--text); color: #fff; }
.carousel__btn--prev { left: 12px; }
.carousel__btn--next { right: 12px; }

/* Лайтбокс */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, .92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: zoom-out;
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
}
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 28px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
}

.project__back {
  display: inline-block;
  margin-top: 8px;
  color: var(--text-soft);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
}
.project__back:hover { color: var(--accent); }

/* Плитка портфолио */
.work { position: relative; display: block; text-decoration: none; color: inherit; }
.work--center {
  grid-column: 1 / -1;
  max-width: calc((100% - clamp(20px, 3vw, 36px)) / 2);
  justify-self: center;
}
.work__img { transition: opacity .2s; }
.work:hover .work__img { opacity: .9; }

/* ── Страница услуги: цены и условия ────────── */
.pricing { padding: clamp(24px, 4vw, 48px) 0 clamp(24px, 3vw, 40px); }
.pricing__packages {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(32px, 5vw, 64px);
  row-gap: clamp(48px, 7vw, 80px);
  align-items: start;
}
.package--center {
  grid-column: 1 / -1;
  max-width: calc((100% - clamp(32px, 5vw, 64px)) / 2);
  justify-self: center;
}
.package__img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: center;
  background: #ededed;
  margin-bottom: clamp(20px, 3vw, 28px);
}
.package__img--right { object-position: right center; }
.package__img--left { object-position: left center; }
.package__name {
  font-family: var(--font-title);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: normal;
  letter-spacing: 0.5px;
  line-height: 1.25;
}
.package__price {
  color: var(--text-soft);
  font-size: 16px;
  margin: 8px 0 24px;
}
.package__desc { color: var(--text-soft); margin-bottom: 16px; }
.package__note { font-size: 14px; color: var(--text-soft); margin-top: 16px; }

/* Сворачиваемая область текста услуги */
.package__body { position: relative; }
.package__body.is-collapsed { overflow: hidden; }
.package__body.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg));
  pointer-events: none;
}
.package__toggle {
  margin-top: 14px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}
.package__toggle:hover { color: var(--accent-dark); }
.package__list { list-style: none; }
.package__list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: var(--text-soft);
}
.package__list li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

.pricing__section-title {
  margin-top: clamp(56px, 8vw, 88px);
}
.pricing__section-title:first-child { margin-top: 0; }

.extras { margin-top: clamp(56px, 8vw, 88px); }
.extras__list { list-style: none; }
.extras__list li {
  display: flex; justify-content: space-between; gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
}
.extras__list li span:last-child { color: var(--text); white-space: nowrap; }

.stages {
  margin: clamp(56px, 8vw, 88px) calc(50% - 50vw) 0;
  padding: clamp(56px, 8vw, 88px) max(24px, calc(50vw - var(--wrap) / 2));
  background: #f4f4f2;
}
.stages { text-align: center; }
.stages__list {
  list-style: none;
  counter-reset: step;
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}
.stages__list li {
  counter-increment: step;
  position: relative;
  padding-left: 56px;
  margin-bottom: 20px;
  color: var(--text-soft);
}
.stages__list li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 14px;
}

/* ── Контакты (страница) ────────────────────── */
.contacts-page {
  text-align: center;
  padding: 0 0 clamp(28px, 3.5vw, 48px);
}
.contacts-page__text {
  max-width: 760px;
  margin: 0 auto 40px;
  color: var(--text-soft);
}
.contacts-page__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 48px;
}
.contacts-page__links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 460px;
  height: 58px;
  padding: 0 32px;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 14px;
  transition: background .2s, color .2s, border-color .2s;
}
.contacts-page__links .soc-ico { width: 26px; height: 26px; transition: filter .2s; }
.contacts-page__links a:hover .soc-ico { filter: brightness(0) invert(1); }
.contacts-page__links a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.contacts-page__meta { color: var(--text-soft); font-size: 15px; }

/* ── Финальный CTA ──────────────────────────── */
.cta {
  text-align: center;
  padding: clamp(56px, 7vw, 96px) 0;
}
.cta--beige { background: #f4f4f2; }
.cta .block-title { margin-bottom: 40px; }
.cta .btn { width: 280px; text-align: center; }

/* ── Футер ──────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 24px;
  text-align: center;
}
.footer__social {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.soc-ico {
  width: 36px;
  height: 36px;
  display: block;
  transition: opacity .2s;
}
.footer__social a:hover .soc-ico { opacity: .7; }
.footer__meta { color: var(--text-soft); font-size: 13px; line-height: 2; }
.footer__meta a { color: var(--text-soft); }

/* ── Адаптив ────────────────────────────────── */
@media (max-width: 800px) {
  /* Шапка: соцыконки слева, бургер справа, пункты — выпадают */
  .nav { justify-content: space-between; align-items: center; padding: 12px 18px; gap: 12px; }
  .nav__social { display: flex; align-items: center; gap: 14px; }
  .nav__social .soc-ico { width: 26px; height: 26px; }
  .nav__burger {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    order: 1; width: 40px; height: 40px; padding: 0; gap: 5px;
    background: none; border: none; cursor: pointer;
  }
  .nav__burger span { display: block; width: 24px; height: 2px; background: var(--text); transition: transform .25s, opacity .25s; }
  .nav__link { order: 2; display: none; width: 100%; text-align: center; padding: 12px 0; }
  .nav.is-open .nav__link { display: block; }
  .nav.is-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .btn { -webkit-tap-highlight-color: transparent; }
  .btn--outline:active { background: var(--text); border-color: var(--text); color: #fff; }
  .hero__caption { padding-bottom: 16px; }
  .about { padding-top: 16px; }
  .about__grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .about__photo--round { order: -1; width: 50%; justify-self: center; margin-bottom: 8px; }
  .service__grid { grid-template-columns: 1fr; }
  .service--mirror .service__media { order: 0; }
  .service__buttons { flex-wrap: wrap; }
  .service__buttons .btn { flex-basis: 100%; }
  .gallery__grid { grid-template-columns: 1fr; }
  .work--center { max-width: none; }
  .work__caption { max-width: calc(100% - 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Карусель проектов: один файл за прокрутку, воздух вокруг */
  .carousel__track { scroll-padding-inline: 8%; padding-inline: 8%; }
  .carousel__track img { height: auto; width: 84%; max-height: 66vh; object-fit: contain; scroll-snap-align: center; }
  .carousel.is-at-start .carousel__btn--prev,
  .carousel.is-at-end .carousel__btn--next { display: none; }
  .pricing__packages { grid-template-columns: 1fr; }
  .package--center { max-width: none; }
}
