/* ===== Бугаков Электромонтаж — styles.css ===== */

:root {
  --bg: #050505;
  --bg-2: #0b0b0b;
  --card: #141414;
  --card-2: #181818;
  --border: rgba(255, 210, 31, 0.14);
  --border-strong: rgba(255, 210, 31, 0.35);
  --accent: #ffd21f;
  --accent-2: #ff8a00;
  --text: #f6f5ee;
  --muted: #b4b2a6;
  --glow: 0 0 24px rgba(255, 170, 30, 0.32);
  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1180px;
  --header-h: 74px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 138, 0, 0.10), transparent 30%),
    radial-gradient(circle at 84% 2%, rgba(255, 210, 31, 0.08), transparent 32%),
    linear-gradient(180deg, var(--bg), #070707 35%, #040404);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
code { background: rgba(255, 210, 31, 0.1); padding: 1px 6px; border-radius: 6px; font-size: .9em; color: var(--accent); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ===== Фоновый canvas ===== */
#circuit-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.85;
}

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn--block { width: 100%; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1200;
  box-shadow: var(--glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 36px rgba(255, 180, 0, 0.5); }

.btn--outline {
  background: rgba(255, 210, 31, 0.04);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--outline:hover { border-color: rgba(255,210,31,.7); background: rgba(255, 210, 31, 0.09); box-shadow: var(--glow); transform: translateY(-2px); }

.btn--ghost {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.09);
  color: var(--muted);
}
.btn--ghost:hover { border-color: var(--border-strong); color: var(--text); box-shadow: var(--glow); transform: translateY(-2px); }

/* ===== Шапка ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.header__inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #121212;
  box-shadow: 0 0 22px rgba(255, 210, 31, 0.28);
}
.brand__text strong { display: block; font-size: 16px; letter-spacing: .02em; }
.brand__text small { display: block; color: var(--muted); font-size: 12px; }

.nav { display: flex; gap: 4px; }
.nav__link {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--muted);
  transition: color .2s, background .2s, box-shadow .2s;
}
.nav__link:hover, .nav__link.is-active { color: var(--text); background: rgba(255,210,31,.08); box-shadow: inset 0 0 0 1px rgba(255,210,31,.15); }

.header__actions { display: flex; align-items: center; gap: 12px; }
.phone-link { font-weight: 800; font-size: 15px; color: var(--accent); white-space: nowrap; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { width: 26px; height: 2px; background: var(--accent); border-radius: 2px; transition: transform .3s, opacity .3s; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Мобильное меню ===== */
.mobile-menu {
  position: fixed;
  top: var(--header-h); left: 12px; right: 12px;
  background: rgba(12, 12, 12, 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 6px;
  transform: translateY(-130%);
  opacity: 0;
  transition: transform .35s ease, opacity .25s ease;
  z-index: 99;
  box-shadow: var(--glow);
}
.mobile-menu.is-open { transform: translateY(0); opacity: 1; }
.mobile-menu__link { padding: 14px 16px; font-size: 16px; font-weight: 600; border-radius: 14px; background: rgba(255,255,255,.04); }
.mobile-menu__link:hover { color: var(--accent); }

/* ===== Hero ===== */
.hero { padding: calc(var(--header-h) + 70px) 0 80px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) 410px; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 210, 31, 0.07);
  border: 1px solid rgba(255, 210, 31, 0.15);
  color: var(--accent);
  text-transform: uppercase;
  font-size: 12.5px; font-weight: 800; letter-spacing: .1em;
}
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }

.hero__title {
  font-size: clamp(40px, 5.6vw, 76px);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -0.03em;
  margin: 22px 0 18px;
  padding-right: .14em;
  width: fit-content;
  max-width: 100%;
  background: linear-gradient(120deg, #fff 35%, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__subtitle { font-size: clamp(20px, 2.6vw, 28px); color: var(--text); font-weight: 600; line-height: 1.2; max-width: 640px; }
.hero__text { color: var(--muted); font-size: 17px; margin-top: 16px; max-width: 620px; }

.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.badge {
  font-size: 13px; font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  color: #efe9d0;
}

/* ===== Карточка мастера ===== */
.master-card {
  position: relative;
  padding: 30px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)),
    rgba(18,18,18,0.82);
  border: 1px solid rgba(255, 210, 31, 0.20);
  box-shadow: 0 30px 70px rgba(0,0,0,.35);
  text-align: center;
  overflow: hidden;
}
.master-card::before {
  content: ""; position: absolute; inset: -2px;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 31, 0.14), transparent);
  transform: translateX(-100%);
  animation: cardSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cardSweep {
  0%, 55% { transform: translateX(-100%); opacity: 0; }
  70% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

.avatar {
  position: relative;
  width: min(260px, 66vw); aspect-ratio: 1;
  margin: 0 auto 22px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid transparent;
  background:
    linear-gradient(#0c0c0c, #0c0c0c) padding-box,
    linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
  box-shadow: 0 0 45px rgba(255, 166, 0, 0.28);
}
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transform: scale(1.32);
  display: block;
}
.avatar__spark {
  position: absolute; right: 18%; top: 14%;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent), 0 0 36px var(--accent-2);
  animation: sparkPulse 2.7s infinite ease-in-out;
  z-index: 2;
}
@keyframes sparkPulse { 0%,100% { transform: scale(.7); opacity:.55; } 50% { transform: scale(1.1); opacity:1; } }

.master-card__info { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.master-card__name { font-size: 30px; font-weight: 900; }
.master-card__role { color: var(--muted); font-size: 15px; }
.master-card__tag {
  margin-top: 6px;
  display: inline-flex; border-radius: 999px; padding: 9px 15px;
  color: #1a1200; font-weight: 800; font-size: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* ===== Секции ===== */
.section { padding: 92px 0; }
.section--alt {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.005)),
    rgba(0,0,0,0.22);
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.section-head { max-width: 800px; margin: 0 auto 44px; text-align: center; }
.kicker { color: var(--accent); text-transform: uppercase; font-size: 13px; font-weight: 900; letter-spacing: .12em; }
.section__title {
  font-size: clamp(30px, 4.4vw, 54px);
  font-weight: 900; line-height: 1.02; letter-spacing: -0.035em;
  margin: 12px 0 16px;
}
.section__lead { color: var(--muted); font-size: 17px; }

/* ===== Услуги ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.service-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)), var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 18px;
  font-weight: 500; font-size: 15px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.service-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--glow); }
.service-card__num {
  flex-shrink: 0;
  font-size: 14px; font-weight: 800; letter-spacing: .04em;
  color: var(--accent);
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255, 210, 31, 0.08);
  border: 1px solid var(--border);
}
.service-card:hover .service-card__num { background: rgba(255, 210, 31, 0.14); border-color: var(--border-strong); }

/* ===== Прайс ===== */
.price-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.price-table { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: rgba(19,19,19,.78); }
.price-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .2s;
}
.price-row:last-child { border-bottom: none; }
.price-row:hover { background: rgba(255,210,31,.05); }
.price-row__name { font-size: 15px; }
.price-row__val { font-weight: 800; color: var(--accent); white-space: nowrap; }
.price-row__val--free { color: #5ee08a; }
.price-row__val--muted { color: var(--muted); font-weight: 700; }

.notice-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)), var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: sticky; top: calc(var(--header-h) + 22px);
}
.notice-card__title { font-size: 20px; margin-bottom: 12px; }
.notice-card p { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.notice-card .btn { margin-top: 4px; }

/* ===== Преимущества ===== */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.advantage {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)), var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 28px 26px;
  border-left: 3px solid var(--accent);
  transition: transform .25s, box-shadow .25s;
}
.advantage:hover { transform: translateY(-4px); box-shadow: var(--glow); }
.advantage__title { font-size: 20px; margin-bottom: 10px; }
.advantage p { color: var(--muted); font-size: 15px; }

.master-note {
  margin-top: 30px;
  background: rgba(255,210,31,.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  text-align: center;
  font-size: 16px;
}

/* ===== Галерея ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.gallery__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  cursor: pointer;
  aspect-ratio: 4 / 3;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; display: block; }
.gallery__item:hover img { transform: scale(1.08); }
.gallery__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 14px 11px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  font-size: 14px; font-weight: 700;
}
.gallery__cat { display: block; font-size: 12px; color: var(--accent); font-weight: 800; }

.empty-hint {
  text-align: center; color: var(--muted); margin-top: 24px; font-size: 15px;
  border: 1px dashed rgba(255,210,31,.3);
  background: rgba(255,210,31,.04);
  border-radius: var(--radius-lg);
  padding: 26px;
}

/* ===== До / после ===== */
.ba-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.ba-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  overflow: hidden;
}
.ba-card__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.ba-card__side { position: relative; aspect-ratio: 3 / 4; cursor: pointer; }
.ba-card__side img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-card__label {
  position: absolute; top: 10px; left: 10px;
  font-size: 12px; font-weight: 800; padding: 5px 11px; border-radius: 999px;
  background: rgba(0,0,0,.7); color: var(--accent);
}
.ba-card__side--after .ba-card__label { color: #5ee08a; }
.ba-card__title { padding: 15px 18px; font-weight: 700; font-size: 15px; }

/* ===== Шаги ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.step {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)), var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform .25s, box-shadow .25s;
}
.step:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.step__num {
  flex-shrink: 0; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1200; box-shadow: var(--glow);
}
.step__text { font-size: 15px; font-weight: 600; }

/* ===== FAQ ===== */
.faq { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq__item {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)), var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 0 22px;
}
.faq__item summary {
  list-style: none; cursor: pointer;
  padding: 19px 0; font-weight: 800; font-size: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; color: var(--accent); font-size: 26px; font-weight: 400; transition: transform .25s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { color: var(--muted); padding: 0 0 20px; font-size: 15px; }

/* ===== Контакты ===== */
.contacts { display: grid; grid-template-columns: 1.2fr 420px; gap: 42px; align-items: center; }
.contacts__name { font-size: 20px; }
.contacts__phone {
  display: inline-block;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 900; letter-spacing: -.03em;
  color: var(--accent);
  margin: 14px 0;
  text-shadow: 0 0 22px rgba(255,170,30,.4);
}
.contacts__city { font-weight: 800; font-size: 18px; }
.contacts__geo { color: var(--muted); margin-top: 10px; font-size: 14px; }
.contacts__card {
  display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)), var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.contacts__note { color: var(--muted); font-size: 14px; text-align: center; margin-top: 4px; }

/* ===== Footer ===== */
.footer { border-top: 1px solid rgba(255,255,255,.06); padding: 28px 0 96px; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 14px; }
.footer__inner a { color: var(--accent); font-weight: 800; }

/* ===== Мобильная панель ===== */
.mobile-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: none; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-strong);
  z-index: 100;
}
.mobile-bar__btn {
  flex: 1; text-align: center;
  min-height: 46px; display: grid; place-items: center;
  border-radius: 14px;
  font-weight: 800; font-size: 14px;
  background: rgba(255,210,31,.06);
  border: 1px solid rgba(255,210,31,.24);
  color: var(--text);
  cursor: pointer;
}
.mobile-bar__btn--call {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1200; border: none; box-shadow: var(--glow);
}

/* ===== Лайтбокс ===== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 200; padding: 30px;
}
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 92vw; max-height: 80vh; border-radius: 14px; box-shadow: 0 0 50px rgba(255,170,30,.3); }
.lightbox__caption { color: var(--text); margin-top: 16px; font-size: 16px; }
.lightbox__close { position: absolute; top: 20px; right: 26px; background: none; border: none; color: #fff; font-size: 42px; cursor: pointer; line-height: 1; }
.lightbox__close:hover { color: var(--accent); }

/* ===== Тост ===== */
.toast {
  position: fixed; left: 50%; bottom: 96px;
  transform: translateX(-50%) translateY(20px);
  z-index: 150;
  padding: 13px 18px;
  background: rgba(18,18,18,.96);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 999px;
  box-shadow: var(--glow);
  opacity: 0; pointer-events: none;
  transition: .25s ease;
  font-size: 14px; font-weight: 600;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Адаптив ===== */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__content { order: 2; }
  .master-card { order: 1; max-width: 430px; margin: 0 auto; }
  .hero__subtitle, .hero__text { margin-left: auto; margin-right: auto; }
  .hero__badges, .hero__buttons { justify-content: center; }
  .price-layout, .contacts { grid-template-columns: 1fr; }
  .notice-card { position: static; }
}

@media (max-width: 768px) {
  .nav, .header__actions { display: none; }
  .burger { display: flex; }
  .mobile-bar { display: flex; }
  .section { padding: 64px 0; }
  .hero { padding: calc(var(--header-h) + 40px) 0 54px; }
}

@media (max-width: 560px) {
  .hero__buttons { display: grid; grid-template-columns: 1fr; }
  .hero__buttons .btn { width: 100%; }
  .ba-card__pair { grid-template-columns: 1fr; }
  .price-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .price-row__val { text-align: left; }
}

/* ===== reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
