:root {
  --accent: #ff6b00;
  --dark: #1a1a2e;
  --light: #f7f7f7;
  --grey: #666;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
}

/* Шапка */
header {
  background: var(--dark);
  color: #fff;
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo-link { display: inline-block; text-decoration: none; color: inherit; }
.logo { font-size: 1.3em; font-weight: bold; }
.logo span { color: var(--accent); }
nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 20px;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: .2s;
}
nav a:hover, nav a.active { border-bottom-color: var(--accent); color: var(--accent); }
nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Страницы */
.page { padding: 50px 5%; animation: heroIn .4s; }

h1 { font-size: 2.2em; margin-bottom: 15px; }
h2 { color: var(--accent); margin: 25px 0 10px; }
.subtitle { color: var(--grey); font-size: 1.1em; max-width: 700px; }

/* Баннер (Hero) — ширина не менялась */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #9B3FF0 100%);
  color: #fff;
  padding: 80px 5%;
  text-align: center;
}
.hero h1 { font-size: 2.6em; }
.hero p { max-width: 700px; margin: 15px auto 30px; color: #ccc; font-size: 1.15em; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 35px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  text-decoration: none;
  transition: .2s;
}
.btn:hover { background: #e05e00; transform: translateY(-2px); }
.btn:disabled { opacity: .6; cursor: wait; }

/* Появление по очереди: один кадр на всех, различаются только задержки */
.hero h1, .hero p, .hero .btn { animation: heroIn .6s ease backwards; }
.hero h1 { animation-delay: .1s; }
.hero p { animation-delay: .3s; }
.hero .btn { animation-delay: .5s; }

#home .grid .card,
.contact-block,
.contact-block > p,
.contact-block form input,
.contact-block form textarea,
.contact-block form .btn,
#services h1,
#services h2,
#services .services li,
#services .gallery-card,
.step { animation: heroIn .5s ease backwards; }

/* Карточки «Почему выбирают нас» */
#home .grid .card:nth-child(1) { animation-delay: .55s; }
#home .grid .card:nth-child(2) { animation-delay: .70s; }
#home .grid .card:nth-child(3) { animation-delay: .85s; }

/* Контакты */
.contact-block { animation-delay: .05s; }
.contact-block > p:nth-of-type(1) { animation-delay: .15s; }
.contact-block > p:nth-of-type(2) { animation-delay: .22s; }
.contact-block > p:nth-of-type(3) { animation-delay: .29s; }
.contact-block > p:nth-of-type(4) { animation-delay: .36s; }
.contact-block > p:nth-of-type(5) { animation-delay: .43s; }
.contact-block form input:nth-of-type(1) { animation-delay: .50s; }
.contact-block form input:nth-of-type(2) { animation-delay: .60s; }
.contact-block form input:nth-of-type(3) { animation-delay: .70s; }
.contact-block form textarea { animation-delay: .80s; }
.contact-block form .btn { animation-delay: .90s; }
.contact-block #formStatus { animation: none; }

/* Услуги */
#services h1 { animation-delay: .05s; }
#services > h2 { animation-delay: .15s; }
#services > section > h2 { animation-delay: .95s; }
#services .services li:nth-child(1) { animation-delay: .25s; }
#services .services li:nth-child(2) { animation-delay: .32s; }
#services .services li:nth-child(3) { animation-delay: .39s; }
#services .services li:nth-child(4) { animation-delay: .46s; }
#services .services li:nth-child(5) { animation-delay: .53s; }
#services .services li:nth-child(6) { animation-delay: .60s; }
#services .services li:nth-child(7) { animation-delay: .67s; }
#services .services li:nth-child(8) { animation-delay: .74s; }
#services .gallery-card { animation-delay: 1.05s; }

.services { margin-top: 10px; padding-left: 20px; }
.services li { margin-bottom: 6px; }

/* Сетка и карточки */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 25px;
}
.card {
  background: #fff;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  transition: .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.card .num { font-size: 2em; font-weight: bold; color: var(--accent); }
.card h3 { margin: 8px 0; }
.card p { color: var(--grey); font-size: .95em; }

/* Блок «Почему выбирают нас» на главной */
.home-intro { padding-top: 50px; }

/* Секция примеров работ на странице услуг */
.works-section { padding: 30px 0; }

/* Галерея: компактные миниатюры */
.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 360px));
  gap: 16px;
}

/* Отступ между телефоном и значком мессенджера */
.contact-messenger { margin-left: 12px; }

/* Галерея: фото влезает целиком */
.gallery-card {
  overflow: hidden;
  border-radius: 8px;
  background: #f2f2f5;
}
.gallery-card img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  display: block;
  transition: transform .3s ease;
  cursor: zoom-in;
}
.gallery-card:hover img { transform: scale(1.05); }
.gallery-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  transform: translateY(-2px);
}
.gallery-card .desc { padding: 18px; }
.gallery-card .desc p { color: var(--grey); font-size: .9em; margin: 6px 0 0; }

/* Лайтбокс */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92%;
  max-height: 92vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  animation: heroIn .25s ease;
}

/* Этапы работы */
.steps { position: relative; margin-top: 40px; padding-left: 10px; }
.steps::before {
  content: '';
  position: absolute;
  left: 37px;
  top: 25px;
  bottom: 25px;
  width: 3px;
  background: var(--accent);
  transform-origin: top;
  transform: scaleY(0);
  animation: drawLine .8s ease .3s forwards;
}
@keyframes drawLine { to { transform: scaleY(1); } }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: #fff;
  padding: 20px 25px;
  margin-bottom: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  position: relative;
  z-index: 1;
  transition: box-shadow .25s, transform .25s;
}
.step:nth-child(1) { animation-delay: .15s; }
.step:nth-child(2) { animation-delay: .35s; }
.step:nth-child(3) { animation-delay: .55s; }
.step:nth-child(4) { animation-delay: .75s; }
@keyframes stepIn {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: none; }
}
.step:hover {
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
  transform: translateX(6px);
}
.step .num {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.4em;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease 1.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,107,0,.35); }
  70%  { box-shadow: 0 0 0 14px rgba(255,107,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,0,0); }
}
.step .text b { display: block; margin-bottom: 4px; font-size: 1.05em; }
.step .text p { color: var(--grey); font-size: .95em; margin: 0; }

/* Контакты */
.contact-block {
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  max-width: 560px;
}
.contact-block p { margin-bottom: 10px; }
form input, form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font: inherit;
}
form input:focus, form textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,107,0,.15);
}
#formStatus { margin-top: 10px; font-size: .95em; }

/* Медовая ловушка: поле вынесено за экран и не читается вслух */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

footer {
  background: var(--dark);
  color: #999;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-size: .9em;
}

@media (max-width: 640px) {
  header { justify-content: center; }
  nav a { margin: 0 8px; }
  .hero h1 { font-size: 1.8em; }
  .gallery-card img { height: 180px; }
}

/* Уважение к настройке «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
