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

:root {
  --yellow:  #FFDD6F;
  --yd:      #e8c84a;
  --red:     #e8332a;
  --dark:    #4e4e53;
  --text:    #1f1f24;
  --muted:   #777782;
  --border:  #e2e2ea;
  --bg:      #f4f4f6;
  --white:   #ffffff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}


/* =====================
   HERO
   ===================== */
.hero-block {
  padding: 26px 0 30px;
}

.logo-line {
  margin-bottom: 20px;
}

.logo-text {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
  line-height: 1.15;
  margin-bottom: 4px;
}

.logo-sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* Карточка-цитата директора — как у конкурента */
.hero-card {
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.hero-card-left {
  flex: 1;
  padding: 18px 18px 20px 20px;
  min-width: 0;
}

/* Красные кавычки — как у конкурента */
.hero-qq {
  font-size: 32px;
  font-weight: 900;
  color: var(--red);
  line-height: 0.9;
  margin-bottom: 10px;
  font-family: Georgia, serif;
  letter-spacing: -1px;
}

.hero-intro {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 14px;
}

.hero-pitch {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
}

/* Фото директора */
.hero-photo-wrap {
  flex: 0 0 150px;
  position: relative;
  background: #e2e2e6;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.hero-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #bbb;
  font-size: 11px;
  text-align: center;
}

.hero-photo-label {
  position: relative;
  z-index: 2;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
  padding: 20px 10px 9px;
  font-size: 10.5px;
  color: rgba(255,255,255,0.88);
  font-weight: 600;
}


/* =====================
   QUIZ BLOCK
   ===================== */
.quiz-block {
  padding: 30px 0 40px;
}

.offer-line {
  width: 36px;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  margin-bottom: 12px;
}

.offer-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.offer-title mark {
  background: var(--yellow);
  color: var(--text);
  padding: 1px 5px 2px;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
}

.offer-sub {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* Quiz card */
.quiz-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.progress-track {
  height: 4px;
  background: #e8e8ee;
}

.progress-fill {
  height: 100%;
  background: var(--yellow);
  width: 0%;
  transition: width 0.45s cubic-bezier(.4,0,.2,1);
}

/* Steps */
.step {
  display: none;
  padding: 22px 20px 4px;
}

.step.active { display: block; }

.step-q {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.35;
}

/* Options — 2 col */
.opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 6px;
}

.opt-wide { grid-column: 1 / -1; }

.opt {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color .15s, background .15s;
  user-select: none;
  line-height: 1.3;
}

.opt:hover { border-color: #c4c4cc; }
.opt.sel { border-color: var(--yd); background: #fffaed; }
.opt input[type="radio"] { display: none; }

.radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ccc;
  flex-shrink: 0;
  position: relative;
  transition: border-color .15s;
}

.opt.sel .radio { border-color: var(--yd); }

.opt.sel .radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--yd);
}

/* Form step */
.step-hint {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.step-hint strong { color: var(--text); }

.phone-inp {
  display: block;
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 15px 16px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  outline: none;
  margin-bottom: 14px;
  transition: border-color .2s;
}

.phone-inp:focus { border-color: var(--yd); }
.phone-inp.error { border-color: var(--red); }

.agree {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 16px;
  cursor: pointer;
  line-height: 1.5;
}

.agree input { display: none; }

.agree-box {
  width: 17px; height: 17px;
  border: 1.5px solid #ccc;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  background: var(--white);
  transition: background .15s, border-color .15s;
}

.agree input:checked + .agree-box {
  background: var(--yd);
  border-color: var(--yd);
}

.agree input:checked + .agree-box::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}

.agree a { color: var(--dark); text-decoration: underline; }

.btn-send {
  display: block;
  width: 100%;
  background: var(--yellow);
  color: var(--dark);
  border: none;
  border-radius: 8px;
  padding: 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 22px;
  transition: background .15s;
}

.btn-send:hover { background: var(--yd); }
.btn-send:disabled { background: #ddd; color: #aaa; cursor: default; }

/* Nav */
.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
}

.btn-back {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 7px 0;
  transition: color .15s;
  visibility: hidden;
}

.btn-back.show { visibility: visible; }
.btn-back:hover { color: var(--text); }

.btn-next {
  background: var(--yellow);
  color: var(--dark);
  border: none;
  border-radius: 8px;
  padding: 11px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s;
  margin-left: auto;
}

.btn-next:hover:not(:disabled) { background: var(--yd); }
.btn-next:disabled { background: #ebebee; color: #bbb; cursor: default; }

/* Success */
.success {
  text-align: center;
  padding: 36px 16px 30px;
}

.success-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 2px solid var(--yd);
  background: #fffaed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--dark);
  font-weight: 900;
  margin: 0 auto 16px;
}

.success-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.success-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}


/* =====================
   TEXT BLOCK
   ===================== */
.text-block {
  padding: 28px 0 32px;
}

.text-block p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 16px;
}

.text-block p.text-block-before-list {
  margin-bottom: 5px;
}

.text-block p:last-child { margin-bottom: 0; }

.text-block ul {
  margin-bottom: 16px;
}

.text-block ul li {
  display: block;
  position: relative;
  padding-left: 15px;
}

.text-block ul li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  background-color: #000;
  border-radius: 100px;
  display: inline-block;
  width: 5px;
  height: 5px;
}

.text-block-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

/* =====================
   ГАЛЕРЕЯ (производство / портфолио)
   Десктоп: миниатюры слева, большое фото справа.
   Узкий мобильный: фото сверху, лента миниатюр снизу.
   ===================== */
.gal-block {
  padding: 4px 0 32px;
}

.gal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.gal-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.gallery {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

/* --- Большое фото --- */
.gal-stage {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #e6e6ea;
  cursor: zoom-in;
}

.gallery--prod .gal-stage { aspect-ratio: 16 / 9; }
.gallery--work .gal-stage { aspect-ratio: 3 / 2; }

.gal-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity .18s ease;
}

.gal-photo.is-swapping { opacity: 0; }

/* Подпись поверх фото */
.gal-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 12px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.62) 0%, transparent 100%);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  pointer-events: none;
}

.gal-counter {
  position: absolute;
  top: 9px; right: 9px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  pointer-events: none;
  letter-spacing: .2px;
}

/* Стрелки на фото */
.gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--text);
  font-size: 19px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;
  opacity: 0;
  transition: opacity .18s, background .15s;
  box-shadow: 0 1px 6px rgba(0,0,0,.18);
}

.gal-stage:hover .gal-nav { opacity: 1; }
.gal-nav:hover { background: #fff; }
.gal-nav:focus-visible { opacity: 1; outline: 2px solid var(--yd); outline-offset: 2px; }
.gal-nav--prev { left: 8px; }
.gal-nav--next { right: 8px; }

/* На тач-устройствах стрелки всегда видны */
@media (hover: none) {
  .gal-nav { opacity: .92; }
}

/* --- Колонка миниатюр --- */
.gal-rail {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  min-width: 0;
}

.gal-rail-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.gal-rail-inner::-webkit-scrollbar { width: 0; height: 0; }

/* Подсказка, что лента прокручивается */
.gal-rail::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 26px;
  background: linear-gradient(to top, var(--bg) 10%, rgba(244,244,246,0));
  pointer-events: none;
  border-radius: 0 0 8px 8px;
}

.gal-thumb {
  flex: 0 0 auto;
  width: 100%;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #e6e6ea;
  cursor: pointer;
  display: block;
  transition: border-color .15s, opacity .15s;
  opacity: .72;
}

.gallery--prod .gal-thumb { aspect-ratio: 16 / 9; }
.gallery--work .gal-thumb { aspect-ratio: 3 / 2; }

.gal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gal-thumb:hover { opacity: 1; border-color: #c4c4cc; }

.gal-thumb.is-active {
  border-color: var(--yd);
  opacity: 1;
}

.gal-thumb:focus-visible {
  outline: 2px solid var(--yd);
  outline-offset: 2px;
}

/* --- Узкий мобильный: фото сверху, лента снизу --- */
@media (max-width: 519px) {
  .gallery { grid-template-columns: 1fr; }

  .gal-stage { grid-column: 1; grid-row: 1; }

  .gal-rail {
    grid-column: 1;
    grid-row: 2;
    height: auto;
  }

  .gal-rail-inner {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
  }

  .gal-thumb { width: 74px; flex: 0 0 74px; }

  .gal-rail::after {
    left: auto;
    top: 0;
    right: 0;
    bottom: 0;
    width: 22px;
    height: auto;
    background: linear-gradient(to left, var(--bg) 10%, rgba(244,244,246,0));
  }
}


/* =====================
   ЛАЙТБОКС
   ===================== */
.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(16,16,20,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 16px 64px;
  opacity: 0;
  transition: opacity .2s ease;
}

.lb[hidden] { display: none; }
.lb.is-open { opacity: 1; }

.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  user-select: none;
}

.lb-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 38px; height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 3px;
  transition: background .15s;
}

.lb-close:hover { background: rgba(255,255,255,0.24); }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 4px;
  transition: background .15s;
}

.lb-nav:hover { background: rgba(255,255,255,0.24); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

.lb-close:focus-visible,
.lb-nav:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

.lb-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 20px 20px;
  text-align: center;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.lb-count {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  margin-top: 3px;
  letter-spacing: .3px;
}

@media (max-width: 519px) {
  .lb { padding: 48px 10px 62px; }
  .lb-nav { width: 38px; height: 38px; font-size: 22px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}

body.lb-open { overflow: hidden; }


/* =====================
   FOOTER
   ===================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 18px 0 36px;
}

.footer p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.footer a { color: var(--muted); text-decoration: underline; }


/* =====================
   MOBILE
   ===================== */
@media (max-width: 400px) {
  .logo-text { font-size: 17px; }
  .offer-title { font-size: 20px; }
  .text-block-title { font-size: 20px; }
  .hero-photo-wrap { flex: 0 0 108px; }
  .opt { font-size: 13px; padding: 11px 12px; }
}

/* =====================
   FORM ERROR
   ===================== */
.form-err {
  font-size: 13px;
  color: var(--red);
  margin-top: -10px;
  margin-bottom: 14px;
  line-height: 1.5;
}
