@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #e8dfc5;
  --bg2:     #dfd5b0;
  --bg3:     #d4c898;
  --text:    #1e1a0f;
  --muted:   #6b5e3e;
  --muted2:  #a8956a;
  --accent:  #b8860b;
  --accent2: #8a6208;
  --border:  rgba(0,0,0,0.1);
  --font: 'Montserrat', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 60px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid rgba(255,255,255,0.25);
  box-shadow:
    0 4px 24px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.45);
  transition: transform 0.4s ease;
}

nav.hidden {
  transform: translateY(-100%);
}


.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
}

.nav-logo .logo-text {
  display: flex;
  flex-direction: column;
}

.nav-logo .logo-name {
  font-size: 20px;
  font-weight: 800;
  color: #556b2f;
  -webkit-text-stroke: 1.5px #1a1a0a;
  paint-order: stroke fill;
  letter-spacing: 1px;
  line-height: 1;
}

.nav-logo .logo-sub {
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin-left: auto;
  margin-right: 48px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.nav-contact a {
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-contact a:hover { color: var(--accent); }

.nav-contact span {
  font-size: 10px;
  color: var(--muted2);
}

/* ─── HERO ─── */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--bg2);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(232,223,197,0.15) 0%, rgba(232,223,197,0.0) 50%, rgba(232,223,197,0.25) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 0 0 20px;
  display: flex;
  justify-content: flex-start;
}

.hero-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding: 48px 44px;
  max-width: 380px;
  text-align: center;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.35),
    0 2px 8px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset 0 -1px 0 rgba(255,255,255,0.1);
  transform: perspective(800px) rotateY(2deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.18), rgba(255,255,255,0));
  border-radius: 24px 24px 0 0;
  pointer-events: none;
}

.hero-card:hover {
  transform: perspective(800px) rotateY(0deg) translateY(-6px);
  box-shadow:
    0 24px 60px rgba(0,0,0,0.4),
    0 4px 12px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -1px 0 rgba(255,255,255,0.1);
}

.hero-card .logo-icon-big {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
}

.hero-card .company-name {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 1;
  margin-bottom: 4px;
  color: #556b2f;
  -webkit-text-stroke: 1.5px #1a1a0a;
  paint-order: stroke fill;
  text-shadow:
    1px 1px 0 #1a1a0a,
    2px 2px 0 #2a2a10,
    3px 3px 0 #333318,
    4px 4px 0 #3a3a1e,
    5px 5px 8px rgba(0,0,0,0.35);
}

.hero-card .company-group {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #6b7c3a;
  margin-bottom: 20px;
}

.hero-divider {
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 20px;
}

.hero-card .tagline {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #e8502a;
  margin-bottom: 8px;
}

.hero-card .city {
  font-size: 12px;
  color: #f0c040;
  letter-spacing: 2px;
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}

.hero-scroll svg { width: 20px; height: 20px; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ─── SECTIONS COMMON ─── */
section {
  padding: 90px 60px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 56px;
}

.section-title {
  font-size: 38px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.15;
  color: #556b2f;
  -webkit-text-stroke: 2px #1a1a0a;
  paint-order: stroke fill;
  display: inline-block;
  transition: transform 0.4s ease, text-shadow 0.4s ease;
  cursor: default;
}

.section-title:hover {
  transform: translateY(-4px);
  text-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.section-logo {
  width: 48px;
  height: 48px;
  opacity: 0.35;
  flex-shrink: 0;
  filter: invert(1) sepia(1) saturate(2) hue-rotate(10deg);
}

/* ─── CALL BUTTON (CTA) ─── */
.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: transparent;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  color: var(--accent2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.call-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.call-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(184,134,11,0.35);
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.hero-card .call-btn {
  margin-top: 24px;
}

/* ─── ABOUT ─── */
#about {
  background: var(--bg2);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
}

.about-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: var(--bg3);
}

.about-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  font-size: 13px;
}

/* ─── STATS BAR ─── */
.stats-bar {
  background: var(--text);
  padding: 40px 60px;
}

.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.stat-item {
  padding: 0 40px;
  border-right: 1px solid rgba(255,255,255,0.12);
}

.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: none; }

.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 6px;
  white-space: nowrap;
}

.stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ─── CONTACTS BAR ─── */
.contacts-bar {
  background: var(--bg3);
  padding: 22px 60px;
  border-bottom: 1px solid var(--border);
}

.contacts-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.contacts-bar a {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.contacts-bar a:hover { color: var(--accent); }

.contacts-bar-logo { width: 36px; opacity: 0.3; filter: invert(1) sepia(1) saturate(2); }

/* ─── SERVICES ─── */
#services {
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.services-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.services-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: color 0.2s;
}

.services-list li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.services-list li:hover { color: var(--text); }

.services-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg2);
}

/* ─── SERVICES GALLERY ─── */
.services-list li {
  cursor: pointer;
}

.services-list li.active {
  color: var(--text);
  font-weight: 700;
}

.services-list li.active::before {
  background: var(--accent);
  width: 8px;
  height: 8px;
}

.services-gallery {
  position: sticky;
  top: 90px;
  width: 100%;
  height: 480px;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gallery-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  font-size: 13px;
  letter-spacing: 1px;
}

.gallery-viewer {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#gallery-main-img {
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: contain;
  background: var(--bg3);
  display: block;
  transition: opacity 0.3s ease;
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg3);
  border-top: 1px solid var(--border);
}

.gallery-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  font-family: inherit;
}

.gallery-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.gallery-counter {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}

.gallery-thumbs {
  display: flex;
  gap: 6px;
  padding: 10px;
  background: var(--bg2);
  overflow-x: auto;
  border-top: 1px solid var(--border);
}

.gallery-thumbs::-webkit-scrollbar { height: 4px; }
.gallery-thumbs::-webkit-scrollbar-track { background: var(--bg2); }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--muted2); }

.gallery-thumb {
  width: 52px;
  height: 40px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
}

.gallery-thumb.active {
  opacity: 1;
  border-color: var(--accent);
}

.gallery-no-photos {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  font-size: 13px;
}

/* ─── ADVANTAGES ─── */
#advantages {
  background: var(--bg2);
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border);
}

.advantage-item {
  background: var(--bg2);
  padding: 36px 40px;
  border: 1px solid var(--border);
  transition: background 0.2s;
}

.advantage-item:hover { background: var(--bg3); }

.advantage-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.advantage-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* ─── PROJECTS ─── */
#projects {
  background: var(--bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.project-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg3);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.project-card:hover img { transform: scale(1.06); }

.project-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(30,26,15,0.85) 0%, transparent 100%);
  padding: 36px 14px 14px;
}

.project-name {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
}

.projects-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 0;
  color: var(--muted2);
  font-size: 14px;
}

/* ─── FOOTER ─── */
footer {
  background: var(--text);
  padding: 48px 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-contacts a {
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s;
}

.footer-contacts a:hover { color: var(--accent); }

.footer-messengers {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.messenger-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: background 0.25s, color 0.25s, transform 0.25s;
  text-decoration: none;
}

.messenger-btn svg { width: 18px; height: 18px; }

.messenger-btn:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.messenger-tg  { background: #2CA5E0; border-color: #2CA5E0; color: #fff; }
.messenger-wa  { background: #25D366; border-color: #25D366; color: #fff; }
.messenger-max { background: #5B5EA6; border-color: #5B5EA6; color: #fff; }

.footer-copy {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.5px;
}

.footer-logo { width: 52px; opacity: 0.3; filter: invert(1); }

/* ─── RESPONSIVE ─── */
/* ─── SCROLL TO TOP ─── */
#scroll-top-btn {
  position: fixed;
  bottom: 36px;
  right: 36px;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 4px 24px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.45);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
#scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1024px) {
  nav { padding: 16px 30px; }
  section { padding: 70px 30px; }
  .stats-bar, .contacts-bar { padding: 36px 30px; }
  footer { padding: 40px 30px; }
  .about-grid, .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── BURGER ─── */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── MOBILE MENU OVERLAY ─── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 148;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.open {
  display: block;
  opacity: 1;
}

/* ─── MOBILE MENU DRAWER ─── */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 75%;
  max-width: 300px;
  background: rgba(232,223,197,0.97);
  backdrop-filter: blur(20px);
  z-index: 149;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 60px 36px;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  display: flex;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu a {
  text-decoration: none;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  width: 100%;
  transition: color 0.2s;
}

.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--accent); }

.mobile-menu .mobile-phone {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 16px;
  border-bottom: none;
  text-decoration: none;
  letter-spacing: 0.5px;
  text-transform: none;
}

@media (max-width: 768px) {
  .hero-bg-mobile { display: block !important; }
  .hero-bg-desktop { display: none !important; }
  .burger { display: flex; }
  .nav-links { display: none; }
  .nav-contact { display: none; }
  .section-title { font-size: 26px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .advantages-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 24px; }
  .stat-item { border-right: none; padding: 0; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 24px; }
  .stat-item:last-child { border-bottom: none; }
  .hero-card { max-width: 90%; padding: 32px 24px; }
  .hero-content { justify-content: center; padding: 0 20px; }
  .hero-card .company-name { font-size: 26px; }
  .hero-card .logo-icon-big { width: 52px; height: 52px; }
  .services-gallery { height: 300px; position: static; }
  .hero-card .call-btn { display: flex; width: 100%; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; gap: 20px; }
  .footer-messengers { justify-content: center; }
  .contacts-bar-inner { flex-direction: column; gap: 10px; text-align: center; }
  .section-header { flex-wrap: wrap; gap: 10px; }
  .section-logo { width: 32px; }
}

@media (max-width: 480px) {
  .projects-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* ─── КОРОТКИЕ / АЛЬБОМНЫЕ ЭКРАНЫ (телефон в развороте) ─── */
@media (max-height: 600px) {
  #hero {
    height: auto;
    min-height: 100vh;
    align-items: flex-start;
    padding: 74px 20px 32px;
  }
  .hero-content {
    padding: 0;
    justify-content: center;
  }
  .hero-scroll { display: none; }

  /* Компактная карточка, чтобы кнопка «Позвоните нам» помещалась целиком */
  .hero-card { padding: 20px 28px; }
  .hero-card .logo-icon-big { width: 40px; height: 40px; margin-bottom: 8px; }
  .hero-card .company-group { margin-bottom: 12px; }
  .hero-card .hero-divider { margin-bottom: 12px; }
  .hero-card .tagline { margin-bottom: 6px; }
  .hero-card .call-btn { margin-top: 16px; }
}
