/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--text); color: var(--bg); }

:root {
  /* Каштановый уголь + фарфоровый туман */
  --bg: #1c1411;
  --bg-soft: #221a16;
  --line: #2d231f;
  --text: #f0e7db;
  --text-dim: #9a8d80;
  --text-muted: #6e6259;

  --pad-x: clamp(20px, 4vw, 56px);
  --max-w: 1640px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in { opacity: 1 !important; transform: none !important; }
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-weight: 400;
}

.h-display {
  font-size: clamp(40px, 7vw, 120px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}
.h-section {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
section { padding: clamp(60px, 9vw, 130px) 0; position: relative; }

/* === HEADER === */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px var(--pad-x);
  background: transparent;
  transition: background 0.3s;
}
.site-header.scrolled { background: rgba(28,20,17,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.logo {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav-main {
  display: flex;
  gap: 32px;
}
.nav-main a {
  font-size: 14px;
  color: var(--text);
  position: relative;
}
.nav-main a.is-active { color: var(--text-dim); }
.nav-main a:hover { color: var(--text-dim); }
.header-cta {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-cta .phone {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.btn-burger {
  display: none;
  width: 26px;
  height: 22px;
  flex-direction: column;
  justify-content: space-between;
}
.btn-burger span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.btn-burger.open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.btn-burger.open span:nth-child(2) { opacity: 0; }
.btn-burger.open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-main {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
    z-index: 90;
  }
  .nav-main.open { transform: translateX(0); }
  .nav-main a { font-size: 28px; }
  .header-cta .phone { display: none; }
  .btn-burger { display: flex; z-index: 101; }
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 400;
  border-radius: 0;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
  border: 1px solid var(--text);
}
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: transparent; color: var(--text); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--text); }
.btn-outline:hover { background: var(--text); color: var(--bg); }
.btn .arrow {
  width: 14px; height: 14px;
  transition: transform 0.3s var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }

/* === HERO VIDEO === */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: flex-end;
}
.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video video, .hero-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(20,14,12,0.4) 0%, rgba(20,14,12,0) 30%, rgba(20,14,12,0) 55%, rgba(20,14,12,0.75) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 var(--pad-x) clamp(40px, 6vw, 80px);
}
.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 84px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  max-width: 920px;
}
.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
  font-size: 13px;
  color: var(--text);
}
.hero-meta .city { color: var(--text-dim); }

/* hero text variant (no video) */
.hero-text {
  min-height: 80vh;
  padding-top: 160px;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-text h1 {
  font-size: clamp(40px, 6.5vw, 104px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
  max-width: 1200px;
}
.hero-text .lead {
  margin-top: 32px;
  color: var(--text-dim);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  max-width: 560px;
}

/* === SECTION HEAD === */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 30px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.section-head .title { font-size: clamp(20px, 1.8vw, 28px); font-weight: 400; letter-spacing: -0.015em; }
.section-head .count { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* === PROJECTS GRID === */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 56px) clamp(16px, 2vw, 32px);
}
.project-card {
  display: block;
}
.project-card .image {
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--bg-soft);
}
.project-card .image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.project-card:hover .image img { transform: scale(1.04); }
.project-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 16px;
  font-size: 14px;
}
.project-card .meta .title { color: var(--text); }
.project-card .meta .sub { color: var(--text-dim); font-size: 13px; }
@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
}

/* === LEAD FORM (inline) === */
.lead-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 80px);
  align-items: start;
}
.lead-block h2 {
  font-size: clamp(32px, 4.5vw, 72px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}
.lead-block .desc {
  margin-top: 24px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
  max-width: 360px;
}
.lead-block form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.field {
  border-bottom: 1px solid var(--line);
  position: relative;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: transparent;
  border: none;
  padding: 22px 0;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
}
.field textarea { min-height: 70px; resize: vertical; padding-top: 22px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field select { padding-right: 24px; appearance: none; cursor: pointer; }
.field select option { background: var(--bg); }
.field:focus-within { border-color: var(--text); }
.lead-block .btn { margin-top: 28px; align-self: flex-start; }
.lead-block .legal { font-size: 12px; color: var(--text-muted); margin-top: 16px; line-height: 1.5; }
@media (max-width: 800px) {
  .lead-block { grid-template-columns: 1fr; }
}

/* === CONTACTS === */
.contacts {
  border-top: 1px solid var(--line);
  padding: clamp(50px, 7vw, 100px) 0;
}
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 30px;
}
.contacts-col h4 {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 400;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.contacts-col ul li { margin-bottom: 10px; font-size: 15px; }
.contacts-col ul li a { transition: color 0.2s; }
.contacts-col ul li a:hover { color: var(--text-dim); }
@media (max-width: 800px) { .contacts-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .contacts-grid { grid-template-columns: 1fr; } }

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
}

/* === SERVICES PAGE === */
.tariffs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 2vw, 32px);
  margin-top: 50px;
}
.tariff {
  border: 1px solid var(--line);
  padding: clamp(28px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: border-color 0.3s;
}
.tariff:hover { border-color: var(--text-muted); }
.tariff .name {
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.tariff .price {
  font-size: clamp(34px, 3.6vw, 56px);
  font-weight: 400;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.tariff .price .unit { font-size: 0.4em; color: var(--text-dim); margin-left: 4px; }
.tariff .desc { color: var(--text-dim); font-size: 15px; line-height: 1.55; }
.tariff-list { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 22px; }
.tariff-list li { font-size: 14px; color: var(--text); padding: 4px 0; }
.tariff .btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 800px) { .tariffs { grid-template-columns: 1fr; } }

.album {
  margin-top: 90px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  border-top: 1px solid var(--line);
  padding-top: 56px;
}
.album h3 {
  font-size: clamp(20px, 1.8vw, 26px);
  margin-bottom: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.album-list li {
  font-size: 14px;
  color: var(--text-dim);
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.album-list li:last-child { border-bottom: none; }
@media (max-width: 800px) { .album { grid-template-columns: 1fr; } }

/* === BLOG === */
.posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 40px);
}
.post {
  display: block;
}
.post .cover {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--bg-soft);
}
.post .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.post:hover .cover img { transform: scale(1.04); }
.post .meta {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--text-dim);
}
.post .title {
  margin-top: 12px;
  font-size: clamp(17px, 1.4vw, 22px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--text);
}
.post .excerpt { margin-top: 10px; color: var(--text-dim); font-size: 14px; line-height: 1.5; }
@media (max-width: 900px) { .posts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .posts { grid-template-columns: 1fr; } }

.blog-empty {
  border: 1px solid var(--line);
  padding: clamp(60px, 8vw, 120px);
  text-align: center;
  margin-top: 60px;
}
.blog-empty p { color: var(--text-dim); font-size: 15px; line-height: 1.6; max-width: 360px; margin: 18px auto 0; }

/* === PROJECT PAGE === */
.project-hero {
  padding-top: 140px;
  padding-bottom: 50px;
}
.project-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 50px;
  transition: color 0.2s, gap 0.3s var(--ease);
}
.project-back:hover { color: var(--text); gap: 14px; }
.project-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 60px;
}
.project-hero h1 {
  font-size: clamp(36px, 5vw, 80px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 18px;
}
.project-hero .sub {
  color: var(--text-dim);
  font-size: clamp(15px, 1.2vw, 17px);
  max-width: 480px;
  line-height: 1.55;
}
.project-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.project-info .item .label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.project-info .item .value {
  font-size: clamp(15px, 1.2vw, 18px);
}
@media (max-width: 800px) { .project-hero-grid { grid-template-columns: 1fr; } }

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(8px, 1vw, 14px);
  margin-bottom: 70px;
}
.gallery .g {
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-soft);
}
.gallery .g img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.gallery .g:hover img { transform: scale(1.03); }
.gallery .g-12 { grid-column: span 12; }
.gallery .g-12 img { aspect-ratio: 16/9; }
.gallery .g-8 { grid-column: span 8; }
.gallery .g-8 img { aspect-ratio: 16/10; }
.gallery .g-6 { grid-column: span 6; }
.gallery .g-4 { grid-column: span 4; }
@media (max-width: 900px) { .gallery .g-4 { grid-column: span 6; } .gallery .g-8 { grid-column: span 12; } }
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery .g, .gallery .g-4, .gallery .g-6, .gallery .g-8, .gallery .g-12 { grid-column: span 1; }
}

.project-video {
  margin-bottom: 70px;
  background: var(--bg);
  overflow: hidden;
}
.project-video video { width: 100%; display: block; }

.next-project {
  border-top: 1px solid var(--line);
  padding: 50px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.next-project .label { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.next-project .name {
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 400;
  letter-spacing: -0.025em;
}

/* === MODAL === */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20,14,12,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--bg);
  border: 1px solid var(--line);
  max-width: 460px;
  width: 100%;
  padding: 40px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.4s var(--ease);
}
.modal.open .modal-box { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
}
.modal-box h3 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.modal-box p { color: var(--text-dim); margin-bottom: 24px; font-size: 14px; line-height: 1.55; }
.modal-box .btn { width: 100%; justify-content: center; margin-top: 8px; }
.modal-box .legal { font-size: 11px; color: var(--text-muted); margin-top: 14px; text-align: center; line-height: 1.5; }

/* === LIGHTBOX === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20,14,12,0.97);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
}
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next {
  position: absolute;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  transition: opacity 0.2s;
  opacity: 0.6;
}
.lightbox .lb-close:hover, .lightbox .lb-prev:hover, .lightbox .lb-next:hover { opacity: 1; }
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* === ANIM === */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.fade-in.is-visible { opacity: 1; transform: translateY(0); }

/* === UTIL === */
.text-dim { color: var(--text-dim); }
.no-scroll { overflow: hidden; }

/* === FOCUS === */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 4px;
}
