/* ============ Tokens ============ */
:root {
  --bg: #F9F9FB;
  --ink: #1E3A2B;
  --muted: #4C5F54;
  --muted-2: #40564A;
  --muted-3: #66726A;
  --muted-4: #6C756E;
  --line: #E3E7E3;
  --panel: #EFF3EF;
  --accent: #AA5D19;
  --accent-on-dark: #FF9528;
  --dark: #1E3A2B;
  --dark-2: #25452F;
  --dark-3: #2E5B3F;
  --dark-4: #35573F;
  --on-dark: #F4F7F4;
  --on-dark-muted: #B9CBBF;
  --on-dark-muted-2: #A8BCAE;
  --on-dark-muted-3: #8FA997;
  --font-body: 'Golos Text', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, Menlo, monospace;
}

/* ============ Base ============ */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

input, button, select, textarea { font-family: inherit; }
button { font: inherit; }

h1, h2, h3, p { margin: 0; }

.page { max-width: 100%; overflow-x: clip; }
.container { max-width: 1280px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

@keyframes floatUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 249, 251, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo__text { display: flex; flex-direction: column; }
.logo__name { font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: 0.5px; line-height: 1; }
.logo__tag { font-size: 11px; font-weight: 600; color: #2D4335; margin-top: 5px; letter-spacing: 0.3px; line-height: 1; }

.main-nav {
  display: flex;
  gap: 20px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-2);
  margin-left: auto;
}
.main-nav a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }

.header-phone { text-align: right; line-height: 1.2; flex-shrink: 0; white-space: nowrap; }
.header-phone__number { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.header-phone__hours { font-size: 11px; color: var(--muted-3); }

.btn-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(30, 58, 43, 0.22); color: #fff; }

.burger {
  display: none;
  gap: 5px;
  cursor: pointer;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 10px;
  flex-shrink: 0;
}
.burger:hover { background: #E3EAE3; }
.burger__line { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); }

.mobile-nav { border-top: 1px solid var(--line); background: var(--bg); }
.mobile-nav[hidden] { display: none; }
.mobile-nav__list {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px 20px;
  display: grid;
  gap: 2px;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted-2);
}
.mobile-nav__list a { padding: 12px 0; border-bottom: 1px solid #EDF0ED; }
.mobile-nav__list a:last-of-type { border-bottom: none; }
.mobile-nav__phone { margin-top: 12px; font-size: 19px; font-weight: 700; color: var(--ink); display: block; border-bottom: none !important; }
.mobile-nav__hours { font-size: 13px; color: var(--muted-3); }

@media (max-width: 1320px) {
  .main-nav, .header-phone { display: none !important; }
}
@media (min-width: 1321px) {
  .burger, .mobile-nav { display: none !important; }
}
@media (max-width: 1320px) {
  .burger { display: grid; }
}
@media (max-width: 640px) {
  .btn-cta[data-cta-header] { padding: 11px 14px; font-size: 13px; }
  .logo__tag { display: none; }
}
@media (max-width: 420px) {
  .logo__mark { width: 30px; height: 30px; }
  .logo__name { font-size: 16px; letter-spacing: 0.3px; }
  .logo { gap: 8px; }
  .btn-cta[data-cta-header] { padding: 10px 12px; font-size: 12px; white-space: normal; text-align: center; }
}

/* ============ Hero ============ */
.hero-wrap {
  background: linear-gradient(180deg, var(--panel) 0%, #F4F6F3 55%, var(--bg) 100%);
  position: relative;
  overflow: hidden;
}
.hero-wrap::before {
  content: '';
  position: absolute;
  top: -180px;
  right: -140px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 58, 43, 0.10) 0%, rgba(30, 58, 43, 0) 70%);
  pointer-events: none;
}
.hero {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px 88px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 56px;
  align-items: stretch;
}
.hero__content { display: flex; flex-direction: column; justify-content: center; }
.hero__title {
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 22px;
}
.hero__lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 28px;
  text-wrap: pretty;
}
.hero__promo {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--dark);
  color: var(--on-dark);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 28px;
}
.hero__promo-icon { font-size: 22px; }
.hero__promo-text { font-size: 15px; line-height: 1.45; font-weight: 500; }
.hero__cta {
  display: block;
  text-align: center;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 19px 34px;
  border-radius: 12px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.hero__cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(30, 58, 43, 0.25); color: #fff; }

.hero__media { display: grid; grid-template-rows: 1fr auto; gap: 16px; align-self: stretch; }
.hero__main-img {
  min-height: 280px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}
.hero__main-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hero__facade { height: 160px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.hero__facade img { width: 100%; height: 160px; object-fit: cover; }
.hero__stat {
  height: 160px;
  border-radius: 12px;
  background: var(--dark);
  color: var(--on-dark);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero__stat-num { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.hero__stat-text { font-size: 13px; color: var(--on-dark-muted-3); line-height: 1.4; margin-top: 4px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
}

/* ============ Section heading shared ============ */
.section { padding: 88px 0; }
.section--alt { background: var(--panel); }
.section-title {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0;
}
.section-sub { font-size: 16px; color: var(--muted); margin: 0 0 40px; }

/* ============ Portfolio ============ */
.portfolio-head {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 36px;
}
.portfolio-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  cursor: pointer;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--muted-2);
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  transition: all .16s ease;
}
.filter-btn.is-active { border-color: var(--dark); background: var(--dark); color: var(--on-dark); }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
}
.work-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: floatUp .4s ease both;
}
.work-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(30, 58, 43, 0.12); }
.work-card__img-btn {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: none;
  cursor: zoom-in;
  background: none;
  position: relative;
  overflow: hidden;
}
.work-card__img-btn img { width: 100%; height: 100%; object-fit: cover; }
.zoom-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(30, 58, 43, 0.92);
  display: grid;
  place-items: center;
  pointer-events: none;
}
.work-card__body { padding: 22px; }
.work-card__title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 14px; }
.work-card__specs { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.work-card__spec { display: flex; justify-content: space-between; gap: 12px; }
.work-card__spec-label { color: var(--muted-4); }
.work-card__spec-val { font-weight: 500; }

.load-more-wrap { display: flex; justify-content: center; margin-top: 36px; }
.btn-outline {
  cursor: pointer;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .16s ease, transform .16s ease;
}
.btn-outline:hover { border-color: var(--dark); transform: translateY(-2px); }
.load-more-wrap[hidden] { display: none; }

/* ============ Quiz ============ */
.quiz-section .container { max-width: 1000px; }
.quiz-heading { text-align: center; margin-bottom: 14px; text-wrap: balance; }
.quiz-sub { text-align: center; color: var(--muted); font-size: 16px; margin: 0 0 40px; }

.quiz-card {
  background: #fff;
  border-radius: 12px;
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 20px 50px rgba(30, 58, 43, 0.08);
}
.quiz-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.quiz-step-label { font-family: var(--font-mono); font-size: 12px; color: var(--muted-3); letter-spacing: 0.08em; }
.quiz-step-title { font-size: 13px; font-weight: 600; color: var(--muted-2); }
.quiz-progress-track { height: 5px; border-radius: 100px; background: var(--line); margin-bottom: 32px; overflow: hidden; }
.quiz-progress-bar { height: 100%; border-radius: 100px; background: var(--accent); transition: width .35s ease; }

.quiz-question-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 24px; }
.quiz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.quiz-option {
  text-align: left;
  cursor: pointer;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.quiz-option:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(30, 58, 43, 0.10); }
.quiz-option.is-selected { border-color: var(--dark); }
.quiz-option img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; margin-bottom: 14px; }
.quiz-option__label { font-size: 16px; font-weight: 600; color: var(--ink); }
.quiz-option__note { font-size: 13px; color: var(--muted-3); margin-top: 4px; }

.quiz-nav-row { display: flex; gap: 16px; align-items: center; margin-top: 26px; }
.link-btn { cursor: pointer; background: none; border: none; font-size: 14px; font-weight: 600; color: var(--muted-3); padding: 0; }
.link-btn:hover { color: var(--ink); }
.quiz-nav-hint { font-size: 13px; color: var(--muted-4); }

.quiz-lead-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 24px; text-align: center; }
.quiz-lead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: stretch;
}
.quiz-render-col { display: flex; flex-direction: column; }
.quiz-render-btn {
  width: 100%;
  flex: 1;
  cursor: zoom-in;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: block;
  transition: transform .2s ease, box-shadow .2s ease;
  background: none;
}
.quiz-render-btn:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(30, 58, 43, 0.12); }
.quiz-render-btn img { width: 100%; min-height: 230px; height: 100%; object-fit: cover; }
.quiz-render-caption { font-size: 13px; color: var(--muted-3); margin: 10px 0 0; }

.quiz-form { display: flex; flex-direction: column; height: 100%; }
.quiz-form-lead { font-size: 15px; color: var(--muted); line-height: 1.55; margin: 0 0 16px; }
.quiz-summary { font-size: 13px; line-height: 1.45; color: var(--muted-2); background: var(--panel); border-radius: 10px; padding: 12px 14px; margin: 0 0 20px; }

.field {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  font-size: 15px;
  background: #fff;
  outline: none;
  margin: 0 0 16px;
}
.field:focus { border-color: var(--dark); }
.field:last-of-type { margin-bottom: 20px; }

.btn-submit {
  display: block;
  width: 100%;
  cursor: pointer;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 18px;
  border-radius: 12px;
  margin: 0;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(30, 58, 43, 0.22); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.form-legal { font-size: 12px; color: var(--muted-4); line-height: 1.5; margin: 12px 0 0; }
.form-legal a { text-decoration: underline; color: inherit; }
.form-legal a:hover { color: var(--accent); }

.quiz-back { margin: 16px 0 0; align-self: start; }

.quiz-done { text-align: center; padding: 24px 0; }
.quiz-done__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--panel);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  font-size: 28px;
  color: var(--accent);
}
.quiz-done__title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 10px; }
.quiz-done__text { font-size: 16px; color: var(--muted); margin: 0 0 22px; }

.quiz-panel[hidden] { display: none; }

/* ============ Materials ============ */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}
.material-card { background: var(--bg); border-radius: 12px; padding: 32px; }
.material-card__eyebrow { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.14em; margin-bottom: 12px; }
.material-card__title { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; }
.material-card__img { height: 170px; border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.material-card__img img { width: 100%; height: 170px; object-fit: cover; }
.material-card__list { display: grid; gap: 12px; }
.material-card__item { display: flex; gap: 12px; font-size: 15px; color: var(--muted-2); line-height: 1.5; overflow-wrap: anywhere; min-width: 0; }
.material-card__item::before { content: '—'; color: #2E7D32; }

/* ============ Production ============ */
.production-section { background: var(--dark); color: var(--on-dark); }
.production-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 48px;
  align-items: center;
  margin-bottom: 56px;
}
.production-title { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 18px; color: var(--on-dark); }
.production-text { font-size: 16px; line-height: 1.65; color: var(--on-dark-muted); margin: 0 0 16px; }
.production-text:last-child { margin-bottom: 0; }
.production-media { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.production-media__item { height: 190px; border-radius: 12px; overflow: hidden; }
.production-media__item img { width: 100%; height: 190px; object-fit: cover; }
.production-media__item--wide { grid-column: span 2; }

.guarantees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.guarantee-card {
  background: var(--dark-2);
  border: 1px solid var(--dark-4);
  border-radius: 12px;
  padding: 26px;
  transition: transform .2s ease, background .2s ease;
}
.guarantee-card:hover { transform: translateY(-4px); background: #2A4A38; }
.guarantee-card__num { font-family: var(--font-mono); font-size: 12px; color: var(--accent-on-dark); margin-bottom: 14px; }
.guarantee-card__title { font-size: 18px; font-weight: 700; margin: 0 0 10px; color: var(--on-dark); }
.guarantee-card__text { font-size: 14px; line-height: 1.55; color: var(--on-dark-muted-2); margin: 0; }

/* ============ Steps ============ */
.steps-title { margin-bottom: 40px; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.step-card { border-top: 2px solid var(--line); padding-top: 22px; transition: border-color .2s ease; }
.step-card:hover { border-color: var(--dark); }
.step-card__num { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; color: #DCE3DD; line-height: 1; margin-bottom: 16px; }
.step-card__title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 10px; }
.step-card__text { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }

/* ============ FAQ ============ */
.faq-section .container { max-width: 860px; }
.faq-heading, .faq-sub { text-align: center; }
.faq-heading { margin-bottom: 14px; }
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-item:hover { border-color: var(--dark); box-shadow: 0 10px 24px rgba(30, 58, 43, 0.08); }
.faq-item.is-open { border-color: var(--dark); }
.faq-item__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  padding: 20px 22px;
  color: var(--ink);
}
.faq-item__q { flex: 1; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; }
.faq-item__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--panel);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}
.faq-item__panel { padding: 0 22px 22px 22px; }
.faq-item__panel[hidden] { display: none; }
.faq-item__a { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); }

/* ============ Contacts ============ */
.contacts-section { padding: 88px 24px 0; }
.contacts-box {
  max-width: 1280px;
  margin: 0 auto;
  background: var(--dark);
  border-radius: 12px;
  padding: clamp(28px, 5vw, 60px);
  color: var(--on-dark);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 48px;
}
.contacts-title { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 16px; color: var(--on-dark); }
.contacts-lead { font-size: 16px; line-height: 1.6; color: var(--on-dark-muted); margin: 0 0 28px; }
.contacts-info { display: grid; gap: 18px; font-size: 15px; }
.contacts-info__label { font-size: 12px; font-family: var(--font-mono); color: var(--on-dark-muted-3); letter-spacing: 0.1em; margin-bottom: 5px; }
.contacts-info__addr { color: var(--on-dark); }
.contacts-info__hours { color: var(--on-dark-muted); font-size: 14px; }
.contacts-phone { color: var(--on-dark); font-size: 20px; font-weight: 700; }
.contacts-phone:hover { color: var(--accent); }
.contacts-social { display: flex; gap: 8px; margin-top: 10px; }
.contacts-social a { padding: 8px 14px; border-radius: 8px; background: var(--dark-2); font-size: 13px; font-weight: 600; color: var(--on-dark); }
.contacts-social a:hover { background: var(--dark-3); color: var(--on-dark); }

.contact-form-card { background: var(--bg); border-radius: 12px; padding: clamp(24px, 3vw, 34px); color: var(--ink); align-self: start; }
.contact-form-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.wanted-project-note { font-size: 13px; line-height: 1.45; color: var(--muted-2); background: var(--panel); border-radius: 10px; padding: 12px 14px; margin: 8px 0 12px; }
.wanted-project-note[hidden] { display: none; }
.contact-form { display: grid; gap: 12px; }
.contact-form .field { margin: 0; }
.contact-form select.field {
  padding: 16px 44px 16px 18px;
  color: var(--muted);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234C5F54' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 16px center;
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(16, 30, 22, 0.88);
  display: grid;
  place-items: center;
  padding: 24px 64px 28px;
  cursor: zoom-out;
  animation: floatUp .18s ease both;
}
.lightbox[hidden] { display: none; }
.lightbox__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: min(1100px, 100%); cursor: default; }
.lightbox__img { max-width: 100%; max-height: 72vh; width: auto; height: auto; object-fit: contain; border-radius: 12px; user-select: none; touch-action: none; }
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .16s ease;
}
.lightbox-nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-nav[hidden] { display: none; }
.lightbox-nav--prev { left: 18px; }
.lightbox-nav--next { right: 18px; }
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 22px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}
.lightbox-cta { text-align: center; color: var(--on-dark); max-width: 560px; }
.lightbox-cta[hidden] { display: none; }
.lightbox-cta__title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.lightbox-cta__meta { font-size: 13px; color: var(--on-dark-muted-2); margin-bottom: 14px; }
.lightbox-cta__btn {
  cursor: pointer;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .16s ease;
}
.lightbox-cta__btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(230, 126, 34, 0.28); }
.lightbox-cta__counter { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--on-dark-muted-3); margin-top: 12px; }
.lightbox-swipe-hint { display: none; }

@media (max-width: 640px) {
  /* Grid tracks below stay pinned to their px minimum instead of shrinking,
     which overflows the viewport on narrow phones (e.g. 375px, 320px). */
  .portfolio-grid,
  .materials-grid,
  .production-top,
  .contacts-box,
  .quiz-lead-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-grid > *,
  .materials-grid > *,
  .production-top > *,
  .contacts-box > *,
  .quiz-lead-grid > * {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .lightbox { padding: 12px 16px 14px; }
  .lightbox__img { max-height: 56vh; }
  .lightbox-nav { display: none; }
  .lightbox-close { width: 32px; height: 32px; top: 10px; right: 10px; font-size: 16px; }
  .lightbox-cta__counter { margin-top: 8px; }

  .lightbox-swipe-hint:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 6px;
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 2;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(16, 30, 22, 0.72);
    color: var(--on-dark);
    font-size: 12px;
    letter-spacing: 0.01em;
    white-space: nowrap;
    pointer-events: none;
    transform: translateX(-50%);
    animation: swipeHintNudge 1.2s ease-in-out 2, swipeHintFade .5s ease forwards 3s;
  }
}

@keyframes swipeHintNudge {
  0%, 100% { transform: translateX(-50%); }
  50% { transform: translateX(calc(-50% - 5px)); }
}
@keyframes swipeHintFade {
  to { opacity: 0; visibility: hidden; }
}

/* ============ Chat widget ============ */
.chat-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.chat-widget__list { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.chat-widget__list[hidden] { display: none; }
.chat-widget__link {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(16, 30, 22, 0.28);
  animation: floatUp .18s ease both;
  transition: transform .18s ease;
}
.chat-widget__link:hover { transform: scale(1.08); }
.chat-widget__link--call { background: var(--dark); }
.chat-widget__link--whatsapp { background: #25D366; }
.chat-widget__link--viber { background: #7360F2; }
.chat-widget__link--telegram { background: #2AABEE; padding: 0; line-height: 0; }
.chat-toggle {
  width: 60px;
  height: 60px;
  padding: 0;
  line-height: 0;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #2AABEE;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(16, 30, 22, 0.3);
  transition: transform .2s ease, background .2s ease;
}
.chat-toggle:hover { transform: scale(1.06); }
.chat-toggle.is-open { background: #FFFFFF; }
.chat-toggle__close[hidden] { display: none; }
.chat-toggle__icon[hidden] { display: none; }

/* ============ Footer ============ */
.site-footer { max-width: 1280px; margin: 0 auto; padding: 56px 24px 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.footer-brand__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-brand__name { font-weight: 800; font-size: 16px; letter-spacing: 0.4px; }
.footer-brand__tag { font-size: 11px; font-weight: 600; color: #2D4335; }
.footer-brand__text { font-size: 14px; color: var(--muted); line-height: 1.6; }
.footer-links { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.footer-legal { font-size: 14px; color: var(--muted); line-height: 1.6; }
.footer-legal a { text-decoration: underline; }
.footer-bottom { padding-top: 24px; font-size: 13px; color: var(--muted-4); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ============ Privacy page ============ */
.privacy-main { max-width: 800px; margin: 0 auto; padding: 56px 24px 80px; }
.privacy-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--on-dark-muted-3); margin: 0 0 12px; }
.privacy-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 10px; }
.privacy-updated { font-size: 14px; color: var(--muted-3); margin: 0 0 32px; }
.privacy h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 32px 0 12px; }
.privacy p, .privacy li { font-size: 16px; line-height: 1.65; color: var(--muted); }
.privacy p { margin: 0 0 12px; }
.privacy ul { margin: 0 0 12px; padding-left: 22px; }
.privacy li { margin: 0 0 6px; }
.privacy a { text-decoration: underline; }

@media (max-width: 640px) {
  .footer-bottom { justify-content: flex-start; }
}
