@keyframes galleryIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Enhanced styles with images, overlays, and effects */
:root {
  --bg: #0f1115;
  --card: #151821;
  --text: #e6e6e6;
  --muted: #a0a0a0;
  --accent: #4f7cff;
  --accent-hover: #6b8fff;
  --overlay: rgba(15, 17, 21, 0.75);
  --border: #222;
  --header-h: 72px; /* динамически обновляется из JS */
  --header-extra: 8px; /* дополнительный зазор под шапкой */
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Inter, Ubuntu, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Offset for sticky header on anchor navigation */
html { scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + var(--header-extra)); }
[id] { scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + var(--header-extra)); }
/* Reserve space with explicit spacer element, not body padding */
body { padding-top: 0; }
.header-spacer { display: none; height: 0; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
/* Ensure content is not overlapped by sticky header */

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 21, 0.9);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  gap: 12px;
}

.site-header .brand {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.brand-sub {
  opacity: .6;
  font-weight: 600;
  margin-left: 6px;
  font-size: .95em;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  transition: transform .3s ease, opacity .3s ease;
}

.nav {
  display: flex;
  align-items: center;
}

.nav a {
  color: var(--text);
  opacity: 0.85;
  margin: 0 12px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav a:hover {
  opacity: 1;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 520px;
  height: auto;
  padding: 60px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1d2e 0%, #0f1115 100%);
  background-image: url('/static/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 17, 21, 0.85) 0%, rgba(26, 29, 46, 0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
  padding: 0 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  margin: 0 0 12px 0;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 0%, #e6e6e6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: #d0d0d0;
  margin: 0 0 18px 0;
}

/* Brand badge in hero */
.hero-brand {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  margin: 0 0 10px 0;
}
.hero-brand span {
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #ffffff 0%, #e6e6e6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

.trust-badges { list-style: none; display: flex; gap: 16px; justify-content: center; padding: 0; margin: 18px 0 0; opacity: .9; }
.trust-badges li { background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 999px; padding: 8px 12px; font-size: .95rem; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 124, 255, 0.3);
}

.btn-large { padding: 14px 36px; font-size: 1.05rem; }
.btn-small { padding: 8px 16px; font-size: .95rem; }
.btn-secondary { background: transparent; border-color: rgba(255,255,255,.2); }
.btn-secondary:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }

/* Section Titles */
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 48px 0;
  color: var(--text);
}

/* Benefits Section */
.benefits-section { 
  padding: 64px 0 32px; 
  position: relative;
  background: linear-gradient(180deg, rgba(26,29,46,0) 0%, rgba(26,29,46,.35) 100%);
}
.benefits-section::before {
  content: "";
  position: absolute; inset: auto auto -40px -80px;
  width: 380px; height: 380px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(79,124,255,.18) 0%, rgba(79,124,255,0) 70%);
  filter: blur(26px);
  pointer-events: none;
}
.benefits-wrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.benefits-intro { background: linear-gradient(180deg, rgba(255,255,255,.02) 0%, rgba(255,255,255,0) 100%), var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px; display: grid; gap: 10px; }
.benefits-intro .btn { justify-self: center; margin-top: 4px; }
.benefits-section .section-title {
  position: relative;
  margin: 0;
}
.section-subtitle { color: var(--muted); margin: 8px 0 14px; }
.benefits-section .section-title::after {
  content: "";
  display: block;
  width: 64px; height: 3px;
  margin: 8px auto 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
}
.benefits-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.benefits-list li { display: flex; align-items: center; gap: 8px; }
.benefits-list li::before { content: "✓"; color: var(--accent); font-weight: 900; }

.benefits-grid { 
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
  gap: 10px;
  align-items: stretch;
}
.benefit-card { 
  background: linear-gradient(180deg, rgba(255,255,255,.02) 0%, rgba(255,255,255,.00) 100%), var(--card); 
  border: 1px solid var(--border); 
  border-radius: 14px; 
  padding: 16px; 
  display: grid; 
  grid-template-columns: 40px 1fr;
  align-items: start;
  gap: 10px; 
  min-height: 96px;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.benefit-card h3, .benefit-card p { grid-column: 2; }
/* ensure icon remains aligned top-left */
.benefit-card .benefit-icon { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
.benefit-card--highlight { 
  grid-column: auto; 
  background: linear-gradient(180deg, rgba(79,124,255,.06) 0%, rgba(79,124,255,.02) 100%), var(--card);
  border-color: rgba(79,124,255,.28);
}
/* Highlight card tidy layout */
.benefit-title { grid-column: 2; font-size: 1.04rem; margin: 0; }
.benefit-divider { grid-column: 2; height: 1px; background: var(--border); margin: 8px 0; }
.flow-line { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .92rem; color: var(--text); opacity: .9; }
.flow-line span { position: relative; white-space: nowrap; }
.flow-line span:not(:last-child)::after { content: '→'; color: var(--muted); margin: 0 6px; }
.flow-note { grid-column: 2; color: var(--muted); text-align: left; margin: 0; font-size: .9rem; }

/* Make highlight card span full row on wide screens */
@media (min-width: 769px) {
  .benefits-grid > .benefit-card--highlight { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .flow-line { font-size: .88rem; }
}
.benefit-card:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 10px 26px rgba(0,0,0,.28); 
  border-color: rgba(255,255,255,.14);
}
.benefit-icon { 
  width: 40px; height: 40px; 
  border-radius: 999px; 
  display: grid; place-items: center; 
  background: radial-gradient(120% 120% at 30% 20%, rgba(79,124,255,.35) 0%, rgba(79,124,255,.08) 40%, transparent 60%); 
  border: 1px solid rgba(79,124,255,.25); 
  font-size: 18px; 
  line-height: 1; 
}
.benefit-card h3 { margin: 0 0 4px 0; font-size: 1.06rem; letter-spacing: .01em; }
.benefit-card p { margin: 0; color: var(--muted); line-height: 1.6; }

@media (max-width: 992px) {
  .benefits-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .benefits-section { padding: 48px 0 20px; }
  .benefits-grid { gap: 12px; grid-template-columns: 1fr; }
  .benefit-card { padding: 16px; grid-template-columns: 40px 1fr; min-height: 0; }
  .benefit-card--highlight { grid-column: auto; }
  .benefit-icon { width: 40px; height: 40px; font-size: 18px; }
}
}

/* Services Section */
.services-section {
  padding: 80px 0;
}

/* Production Section */
.production-section {
  position: relative;
  padding: 80px 0 28px;
  background: linear-gradient(180deg, rgba(26,29,46,0.05) 0%, rgba(26,29,46,0.18) 100%);
  overflow: hidden;
}
.production-section::after {
  content: none;
}
.capability-badges { display: flex; gap: 10px; justify-content: center; margin: -28px 0 22px; flex-wrap: wrap; }
.capability-badge { border: 1px solid rgba(79,124,255,0.35); background: rgba(79,124,255,0.08); color: #dde5ff; padding: 6px 10px; border-radius: 999px; font-weight: 700; font-size: .9rem; }

.capability-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: stretch; }
.capability-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,0) 100%), var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: start;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.capability-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(79,124,255,.8), rgba(79,124,255,.15));
  opacity: .6;
}
.capability-card::after {
  content: "";
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(79,124,255,.18) 0%, rgba(79,124,255,0) 70%);
  filter: blur(10px);
  opacity: .6;
}
.capability-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  border-color: rgba(255,255,255,.14);
}
.capability-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: radial-gradient(120% 120% at 30% 20%, rgba(79,124,255,.35) 0%, rgba(79,124,255,.08) 40%, transparent 60%);
  border: 1px solid rgba(79,124,255,.25);
  font-size: 20px; line-height: 1;
  box-shadow: inset 0 0 24px rgba(79,124,255,.08);
}
.capability-title { margin: 0; font-size: 1.08rem; font-weight: 800; letter-spacing: .01em; color: var(--text); }
.capability-desc { grid-column: 2; margin: 6px 0 0; color: var(--muted); }
.capability-note { max-width: 900px; margin: 18px auto 0; text-align: center; color: var(--muted); }
.capability-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }

@media (max-width: 768px) {
  .production-section { padding: 56px 0 24px; }
  .capability-badges { margin-top: -14px; }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* Растягиваем карточки на одинаковую высоту */
.grid .service-link { height: 100%; }
.grid .service-card { height: 100%; display: flex; flex-direction: column; }

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* Clickable service card link */
.service-link { display: block; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
.service-link:link, .service-link:visited { color: inherit; }
/* Убираем синий фокус и задаём нейтральный */
.service-link:focus, .service-link:focus-visible { outline: none; }
.service-link:focus-visible .service-card { box-shadow: 0 0 0 2px rgba(255,255,255,0.18), 0 12px 28px rgba(0,0,0,0.35); border-color: #2a2a2a; }

/* Центровка текста и одинаковая высота на странице калькулятора */
.calc-section .grid { align-items: stretch; }
.calc-section .service-link { height: 100%; }
.calc-section .service-card { height: 100%; display: flex; flex-direction: column; }
.calc-section .service-content { text-align: center; align-items: center; }
.calc-section .service-link h3, .calc-section .service-link p { color: var(--text); }

/* Нейтральный цвет выделения текста на странице калькулятора */
.calc-section ::selection { background: rgba(255,255,255,0.15); color: var(--text); }

.service-card:hover {
  transform: none;
  box-shadow: none;
}

.service-image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1d2e 0%, #151821 100%);
}

.service-image img, .service-image picture, .portfolio-item picture, .portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-image img {
  transition: transform 0.5s ease;
}

.service-card:hover .service-image img {
  transform: none;
}

.service-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.service-content h3 {
  margin: 0 0 12px 0;
  font-size: 1.4rem;
  color: var(--text);
}

.service-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* Portfolio Section */
.portfolio-section {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--bg) 0%, #1a1d2e 100%);
}
/* Reduce gap when portfolio follows production */
.production-section + .portfolio-section {
  padding-top: 56px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.portfolio-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--card);
  -webkit-tap-highlight-color: transparent;
}

/* State when image is missing */
.portfolio-item.no-image {
  background: linear-gradient(135deg, #1a1d2e 0%, #151821 100%);
  border: 1px dashed var(--border);
}
.portfolio-item.no-image .portfolio-overlay { opacity: 1; }

.portfolio-item img {
  transition: transform 0.5s ease;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 17, 21, 0.95) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Hover devices */
@media (hover: hover) and (pointer: fine) {
  .portfolio-item:hover .portfolio-overlay { opacity: 1; }
  .portfolio-item:hover img { transform: scale(1.05); }
}

/* Touch devices */
@media (hover: none) {
  .portfolio-item:active .portfolio-overlay { opacity: 1; }
  .portfolio-item:active img { transform: scale(1.05); }
}

.portfolio-overlay h4 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  color: #fff;
}

.portfolio-overlay p {
  margin: 0;
  color: #d0d0d0;
  font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, #1a1d2e 0%, #0f1115 100%);
}

.cta-section h2 {
  font-size: 2.2rem;
  margin: 0 0 16px 0;
  color: var(--text);
}

.cta-section p {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 24px 0;
}

.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Calc intro on home */
.calc-intro { padding: 64px 0 16px; }

/* Lead Modal */
.lead-modal { position: fixed; inset: 0; z-index: 400; display: none; }
.lead-modal--open { display: block; }
.lead-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.lead-modal__dialog { position: relative; max-width: 560px; margin: 10vh auto; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; z-index: 1; }
.lead-modal__close { position: absolute; top: 8px; right: 8px; border: 0; background: transparent; color: #bbb; cursor: pointer; font-size: 20px; border-radius: 6px; padding: 6px; }
.lead-modal__close:hover { color: #fff; background: rgba(255,255,255,.08); }
.lead-modal__title { margin: 0 0 6px; font-size: 1.4rem; }
.lead-modal__subtitle { margin: 0 0 16px; color: var(--muted); }
.lead-form { display: grid; gap: 12px; }
.lead-form__row label { display: grid; gap: 6px; }
.lead-form input[type="text"], .lead-form input[type="tel"], .lead-form textarea { background: #0f1115; color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.lead-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.lead-hint { color: var(--muted); display: block; margin-top: 8px; }

@media (max-width: 600px) {
  .lead-modal__dialog { margin: 8vh 16px; }
}

/* Gallery Modal */
.gallery-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; }
.gallery-modal--open { display: flex; }
.gallery-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(2px); }
.gallery-dialog { position: relative; width: min(1120px, 96vw); height: min(86vh, 780px); margin: 0; background: rgba(15,17,21,0.94); border: 1px solid var(--border); border-radius: 14px; display: grid; grid-template-rows: auto 1fr auto; z-index: 1; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: galleryIn .18s ease-out; }
.gallery-close { position: absolute; top: 8px; right: 8px; border: 0; background: rgba(255,255,255,0.08); color: #eee; cursor: pointer; font-size: 20px; border-radius: 8px; padding: 6px 10px; z-index: 2; }
.gallery-close:hover { background: rgba(255,255,255,0.16); }
.gallery-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; padding-right: 84px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0)); }
.gallery-title { font-weight: 700; }
.gallery-counter { color: var(--muted); font-size: .95rem; }
.gallery-viewport { position: relative; height: 100%; padding: 16px; }
.gallery-slides { height: 100%; overflow: hidden; position: relative; }
.gallery-slide { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .25s ease; }
.gallery-slide.active { opacity: 1; }
.gallery-slide img { display: block; width: auto; height: auto; max-width: min(92vw, 980px); max-height: min(70vh, 620px); object-fit: contain; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.gallery-prev, .gallery-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.08); backdrop-filter: blur(2px); border: 0; color: #fff; cursor: pointer; font-size: 24px; line-height: 1; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.35); z-index: 2; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-prev:focus-visible, .gallery-next:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gallery-prev:hover, .gallery-next:hover { background: rgba(255,255,255,0.16); }
.gallery-pagination { display: flex; gap: 8px; justify-content: center; padding: 10px 0 14px; position: relative; z-index: 2; }
.gallery-dot { width: 10px; height: 10px; border-radius: 999px; background: rgba(255,255,255,0.35); cursor: pointer; transition: transform .15s ease, background .15s ease; }
.gallery-dot:hover { transform: scale(1.1); }
.gallery-dot.active { background: #fff; }

@media (max-width: 768px) {
  .gallery-dialog { width: calc(100vw - 24px); height: min(86vh, 680px); margin: 0 12px; }
  .gallery-viewport { padding: 10px; }
  .gallery-slide img { max-width: 96vw; max-height: 76vh; }
  .gallery-prev { left: 6px; }
  .gallery-next { right: 6px; }
}

/* Visually hidden (for a11y/SEO headings) */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Local SEO text */
.seo-local { padding: 32px 0 16px; color: var(--muted); }
.seo-local p { margin: 0 0 10px 0; }

/* Footer */
.site-footer {
  margin-top: 0;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
}

.site-footer a,
.site-footer a:visited {
  color: #dde5ff; /* светлый оттенок для хорошей читаемости на тёмном фоне */
  text-decoration-color: rgba(221,229,255,0.45);
}
.site-footer a:hover,
.site-footer a:focus {
  color: #ffffff;
  text-decoration-color: rgba(255,255,255,0.6);
}

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

/* Sticky CTA */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 200; pointer-events: none; display: none; }
.sticky-cta--visible { display: block; }
.sticky-cta__container { display: flex; justify-content: center; }
.sticky-cta__inner { pointer-events: auto; background: rgba(20,22,30,0.92); backdrop-filter: blur(10px) saturate(140%); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.sticky-cta__text { color: var(--text); opacity: .9; font-weight: 600; }
.sticky-cta__close { background: transparent; border: 0; color: #aaa; cursor: pointer; font-size: 18px; line-height: 1; padding: 4px 6px; border-radius: 6px; }
.sticky-cta__close:hover { color: #fff; background: rgba(255,255,255,0.08); }

@media (min-width: 769px) {
  .sticky-cta__inner { max-width: 600px; }
}

@media (max-width: 768px) {
  .sticky-cta__text { display: none; }
}

@media (max-width: 480px) {
  .sticky-cta__inner { padding: 8px 10px; }
}

/* Responsive */
@media (max-width: 992px) {
  .container { padding: 0 16px; }
}

@media (max-width: 768px) {
  /* Моб фикс: шапка фиксированная, явный spacer под неё, без blur чтобы убрать рывки */
  :root { --header-h: 72px; --header-extra: 22px; }
  .header-spacer { display: none; height: 0; }
  body { padding-top: 0 !important; }

  .site-header { position: sticky; top: 0; background: rgba(15,17,21,0.98); backdrop-filter: none; height: auto; }
  .site-header .container { height: auto; padding: 12px 16px; }
  .menu-toggle { display: inline-block; }
  .nav { display: none; }
  .site-header .brand { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav.nav--open {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(15,17,21,.98);
    border-top: 1px solid var(--border);
    padding: 16px;
    flex-direction: column;
    gap: 12px;
  }
  .nav.nav--open a { margin: 6px 0; font-size: 1.05rem; }

  .site-header .container { padding: 12px 16px; }

  .hero { min-height: 420px; height: auto; padding: 48px 0; }
  .hero h1 { font-size: 1.9rem; }
  .hero p { font-size: 1rem; }
  .trust-badges { flex-wrap: wrap; gap: 10px; }
  .hero-brand span { font-size: 0.9rem; }

  /* Полностью отключаем любые анимации/зум у первого блока на мобиле */
  .hero, .hero * { animation: none !important; transition: none !important; transform: none !important; }

  .section-title { font-size: 1.6rem; margin-bottom: 28px; }

  .grid { gap: 16px; }
  .service-image { height: 180px; }

  .portfolio-grid { grid-template-columns: 1fr; }
}

/* Calculator */
.calc-section { padding: 48px 0 80px; }
.calc-note { color: var(--muted); text-align: center; margin: -12px 0 24px; }
.calc-note--emphasis { color: var(--text) !important; font-weight: 900 !important; text-align: center !important; font-size: 1.2rem; letter-spacing: .01em; margin: 8px 0 28px; display: block; }

/* Выбор калькулятора */
.calc-chooser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 0 auto 24px;
}
.calc-chooser-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-size .25s ease;
  overflow: hidden;
}
.calc-chooser-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.4); }

/* Медиа-карточка с фоном */
.calc-chooser-media {
  position: relative;
  height: 220px;
  padding: 0;
  background: #111;
  background-image: var(--bg-img);
  background-size: cover;
  background-position: center;
}
.calc-chooser-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.8) 100%);
}
.calc-chooser-text {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
}
.calc-chooser-title { font-weight: 900; font-size: 1.25rem; margin-bottom: 6px; color: #fff; }
.calc-chooser-desc { color: #e5e5e5; font-size: .95rem; opacity: .9; }

.calc-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; max-width: 680px; margin: 0 auto; }
.calc-form { display: grid; gap: 18px; }
.calc-field label { display: block; font-weight: 600; margin-bottom: 8px; }
.calc-field input[type="number"],
.calc-field input[type="range"] { width: 100%; }
.calc-field input[type="number"] { background: #0f1115; color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.calc-field small { color: var(--muted); }
.calc-summary { display: grid; gap: 8px; background: #10131b; border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.calc-total { display: flex; align-items: baseline; gap: 12px; }
.calc-total-label { color: var(--muted); }
.calc-total-value { font-size: 2rem; font-weight: 800; letter-spacing: .02em; }
.calc-range { color: var(--muted); }
.calc-actions { margin-top: 4px; }
.calc-disclaimer { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }

/* Stairs Calculator */
.calc-stairs-section { padding: 48px 0 80px; }
.calc-stairs-wrapper {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.calc-stairs-form { display: grid; gap: 24px; }

.calc-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.calc-block-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.calc-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.calc-field:last-child { margin-bottom: 0; }

.calc-field label {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.calc-field input[type="number"],
.calc-field select {
  width: 100%;
  background: #0f1115;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.calc-field input[type="number"]:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--accent);
}

.calc-field small {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

.calc-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.calc-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent);
}

.calc-checkbox label {
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.calc-subblock {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Summary Card */
.calc-stairs-summary {
  position: sticky;
  top: 80px;
  align-self: start;
}

.summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.summary-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: var(--text);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  gap: 12px;
}

.summary-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.summary-value {
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.summary-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0 8px;
  gap: 12px;
}

.summary-label-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.summary-value-total {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.summary-range {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.summary-actions {
  margin-top: 8px;
}

.summary-actions .btn {
  width: 100%;
  text-align: center;
}

/* Trust-факторы */
.summary-trust {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 12px;
  background: rgba(79, 124, 255, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(79, 124, 255, 0.15);
}

.summary-trust-item {
  color: var(--text);
  font-size: 0.92rem;
  opacity: 0.95;
}

/* Social proof */
.summary-social {
  text-align: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.summary-social small {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Визуальный выбор типа лестницы */
.stair-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.stair-type-card {
  position: relative;
  cursor: pointer;
  display: block;
}

.stair-type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.stair-type-content {
  background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,0) 100%), #10131b;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 14px;
  text-align: center;
  transition: all 0.25s ease;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.stair-type-card:hover .stair-type-content {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79, 124, 255, 0.25);
}

.stair-type-card input[type="radio"]:checked + .stair-type-content {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(79,124,255,.12) 0%, rgba(79,124,255,.04) 100%), #10131b;
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.stair-type-icon {
  font-size: 32px;
  margin-bottom: 6px;
  line-height: 1;
}

.stair-type-content h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.stair-type-price {
  display: none; /* скрываем цену на карточках типа */
}

.stair-type-content small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

/* Details (свёрнутые блоки) */
.calc-details {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.calc-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  padding: 8px 0;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-details summary::-webkit-details-marker {
  display: none;
}

.calc-details summary::before {
  content: "▶";
  font-size: 0.7em;
  transition: transform 0.2s ease;
}

.calc-details[open] summary::before {
  transform: rotate(90deg);
}

.calc-details-content {
  margin-top: 12px;
  display: grid;
  gap: 16px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Бейдж "опционально" */
.optional-badge {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Responsive для калькулятора */
@media (max-width: 992px) {
  .calc-stairs-wrapper {
    grid-template-columns: 1fr;
  }
  
  .calc-stairs-summary {
    position: static;
  }
  
  .stair-type-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   WIZARD CALCULATOR STYLES
   ============================================ */

/* Wizard Section */
.calc-wizard-section {
  padding: 48px 0 80px;
}

.calc-wizard-section .container {
  padding-left: 20px;
  padding-right: 20px;
}

/* Progress Bar */
.wizard-progress {
  max-width: 800px;
  margin: 0 auto 40px;
}

.wizard-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  margin-bottom: 20px;
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #6b8fff 100%);
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-steps-indicator {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.wizard-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 120px;
}

.wizard-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.3s ease;
}

.wizard-step-dot.active .wizard-step-number {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

.wizard-step-dot.completed .wizard-step-number {
  background: rgba(79, 124, 255, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.wizard-step-dot.completed .wizard-step-number {
  font-size: 0; /* Скрываем цифру */
}

.wizard-step-dot.completed .wizard-step-number::before {
  content: "✓";
  font-size: 1.2rem; /* Галочка видна */
}

.wizard-step-label {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.wizard-step-dot.active .wizard-step-label {
  color: var(--text);
  font-weight: 600;
}

/* Wizard Wrapper */
.wizard-wrapper {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Wizard Container (левая часть) */
.wizard-container {
  min-height: 500px;
  position: relative;
}

/* Wizard Screens */
.wizard-screen {
  display: none;
  opacity: 0;
  transform: translateY(20px);
}

.wizard-screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.22s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
  line-height: 1.2;
}

.wizard-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 32px;
  line-height: 1.5;
}

/* Stair Type Grid (большие карточки) */
.stair-type-grid-large {
  display: grid;
  gap: 20px;
  margin-top: 8px;
}

/* Для 2 карточек */
.stair-type-grid-two {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .stair-type-grid-two {
    grid-template-columns: 1fr;
  }
}

.stair-type-card-large {
  cursor: pointer;
  display: block;
}

.stair-type-card-large input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.stair-type-content-large {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 0;
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Изображение в карточке */
.stair-type-image {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
}

.stair-type-body {
  padding: 16px 20px 20px;
  display: grid;
  gap: 8px;
}

.stair-type-card-large:hover .stair-type-content-large {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(79, 124, 255, 0.2);
}

.stair-type-card-large:hover .stair-type-content-large {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(79, 124, 255, 0.2);
}

.stair-type-card-large input[type="radio"]:checked + .stair-type-content-large {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset, 0 8px 24px rgba(79, 124, 255, 0.15);
}

.stair-type-icon-large {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1;
}

.stair-type-content-large h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.stair-type-price-large {
  display: none; /* скрываем цену на карточках типа */
}

.stair-type-desc {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.stair-type-badge {
  display: inline-block;
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Wizard Fields */
.wizard-fields {
  display: grid;
  gap: 24px;
  margin-top: 8px;
}

.wizard-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wizard-field label {
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.wizard-field-icon {
  font-size: 1.3rem;
}

.wizard-field-label {
  flex: 1;
}

.wizard-field input[type="number"],
.wizard-field select {
  width: 100%;
  background: #0f1115;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1.05rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wizard-field input[type="number"]:focus,
.wizard-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.1);
}

.wizard-field small {
  color: var(--muted);
  font-size: 0.9rem;
}

.wizard-field-hint {
  background: rgba(79, 124, 255, 0.08);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 8px;
}

.wizard-field-result {
  color: var(--text);
  font-size: 0.95rem;
}

.wizard-field-result strong {
  color: var(--accent);
  font-weight: 700;
}

/* Wizard Checkbox Field */
.wizard-field-checkbox {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wizard-field-checkbox:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.02);
}

.wizard-field-checkbox input[type="checkbox"] {
  width: 24px;
  height: 24px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.wizard-checkbox-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wizard-checkbox-title {
  font-weight: 600;
  color: var(--text);
}

.wizard-checkbox-desc {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Wizard Subfields */
.wizard-subfields {
  margin-left: 36px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
  margin-top: 12px;
  display: grid;
  gap: 16px;
}

/* Wizard Details (свернутые блоки) */
.wizard-details {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.wizard-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  padding: 8px 0;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-details summary::-webkit-details-marker {
  display: none;
}

.wizard-details summary::before {
  content: "▶";
  font-size: 0.7em;
  transition: transform 0.2s ease;
}

.wizard-details[open] summary::before {
  transform: rotate(90deg);
}

.wizard-details-content {
  margin-top: 16px;
  display: grid;
  gap: 16px;
  animation: slideDown 0.3s ease;
}

/* Wizard Options (карточки опций) */
.wizard-options {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

.wizard-option-card {
  cursor: pointer;
  display: block;
}

.wizard-option-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wizard-option-content {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: all 0.25s ease;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
}

.wizard-option-card:hover .wizard-option-content {
  border-color: rgba(255,255,255,0.2);
  transform: translateX(4px);
}

.wizard-option-card input[type="checkbox"]:checked + .wizard-option-content {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(79,124,255,.08) 0%, rgba(79,124,255,.02) 100%), var(--card);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.wizard-option-icon {
  font-size: 32px;
  line-height: 1;
}

.wizard-option-content h4 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: var(--text);
}

.wizard-option-price {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
}

.wizard-option-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.wizard-suboptions {
  margin-left: 48px;
  margin-top: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  border: 1px solid var(--border);
  display: grid;
  gap: 12px;
}

.wizard-field-checkbox label {
  cursor: pointer;
  user-select: none;
}

/* Wizard Navigation */
.wizard-nav {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Chips (presets) */
.chip-groups {
  display: grid;
  gap: 10px;
  margin: 12px 0 8px;
}
.chip-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.chip-label { color: var(--muted); font-size: .95rem; }
.chip {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .95rem;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); }

/* Config presets */
.config-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0 14px;
}

/* Inline turn toggle on card */
.inline-turn-toggle {
  display: none;
  gap: 6px;
  margin-top: 10px;
}
.segmented {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.segmented input { display: none; }
.segmented span {
  display: inline-block;
  padding: 6px 10px;
  font-size: .9rem;
  color: var(--muted);
}
.segmented input:checked + span {
  background: var(--accent);
  color: #fff;
}

/* Sticky total bar (mobile) */
.sticky-total-bar {
  position: sticky;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(16,19,27,0.92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(6px);
  z-index: 50;
}
.sticky-total-text { font-weight: 700; color: var(--text); }

@media (max-width: 768px) {
  .sticky-total-bar { display: flex; }
  /* На мобилке цена показывается только в липком баре */
  .calc-section .summary-total { display: none; }
}

.wizard-nav .btn {
  min-width: 140px;
}

/* Wizard Summary (правая sticky-панель) */
.wizard-summary {
  position: sticky;
  top: 80px;
  align-self: start;
}

/* Summary Preview */
.summary-preview {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(79,124,255,.08) 0%, rgba(79,124,255,.02) 100%);
  border-radius: 12px;
  margin-bottom: 16px;
}

.summary-preview-icon {
  font-size: 48px;
  margin-bottom: 8px;
  line-height: 1;
}

.summary-preview-type {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

/* Responsive для wizard */
@media (max-width: 1200px) {
  .wizard-wrapper {
    grid-template-columns: 1fr 380px;
    gap: 30px;
  }
}

@media (max-width: 992px) {
  .wizard-wrapper {
    grid-template-columns: 1fr;
  }
  
  .wizard-summary {
    position: static;
  }
  
  .wizard-steps-indicator {
    flex-wrap: wrap;
  }
  
  .wizard-step-dot {
    max-width: 80px;
  }
  
  .wizard-step-label {
    font-size: 0.75rem;
  }
  
  .wizard-step-number {
    width: 36px;
    height: 36px;
  }
  
  .stair-type-grid-large {
    gap: 12px;
  }
  
  .stair-type-content-large {
    padding: 20px;
  }
  
  .wizard-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .calc-wizard-section {
    padding: 32px 0 60px;
  }
  
  .wizard-progress {
    margin-bottom: 28px;
  }
  
  .wizard-steps-indicator {
    gap: 8px;
  }
  
  .wizard-step-number {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .wizard-step-label {
    font-size: 0.7rem;
  }
  
  .stair-type-icon-large {
    font-size: 36px;
  }
  
  .stair-type-content-large h3 {
    font-size: 1.2rem;
  }
  
  .wizard-nav {
    flex-direction: column-reverse;
  }
  
  .wizard-nav .btn {
    width: 100%;
  }
  
  .wizard-suboptions {
    margin-left: 0;
  }
  
  .wizard-subfields {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-top: 2px solid var(--border);
    padding-top: 16px;
  }
}

/* Bonus chips (calculators) */
.bonus-mini { margin-top: 10px; }
.bonus-mini-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.bonus-mini-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.bonus-mini-chip { padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(79,124,255,0.3); background: transparent; color: #b0b0b0; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.bonus-mini-chip:hover { border-color: rgba(79,124,255,0.6); color: #e6e6e6; }
.bonus-mini-chip.is-selected { background: rgba(79,124,255,0.2); border-color: rgba(79,124,255,0.6); color: #e6e6e6; }

/* Bonus radios (lead modal) */
.bonus-radio { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid rgba(79,124,255,0.2); border-radius: 999px; background: rgba(255,255,255,0.02); cursor: pointer; }
.bonus-radio input { accent-color: var(--accent); }
.bonus-radio:hover { border-color: rgba(79,124,255,0.4); }
