/* Спектр.кз — остекление и обшивка балконов, Астана */

:root {
  /* нейтральная шкала: светлый цех, тёплый графит */
  --bg: #F4F3F0;
  --surface: #FDFDFB;
  --raised: #EBE9E4;
  --line: rgba(28, 27, 26, .09);
  --line-strong: rgba(28, 27, 26, .16);

  /* текст */
  --text: #1C1B1A;
  --text-2: #4C4A44;
  --text-3: #696964;

  /* акценты */
  --accent: #1A1A1A;          /* фирменный чёрный: главная кнопка */
  --accent-hover: #3A3835;
  --bronze: #845B29;          /* номера шагов и ключевая цифра карточки */
  --beige: #D8C3A5;           /* фирменный бежевый: выбор в тёмном расчёте */

  /* тёмная секция расчёта */
  --dark: #1C1B1A;
  --dark-raised: #2A2826;
  --dark-line: rgba(243, 243, 242, .12);
  --on-dark: #F3F3F2;
  --on-dark-2: #BDB8AE;

  --font: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; color: var(--text); font-weight: 500; }
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.icon { display: block; flex-shrink: 0; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 16px; border-radius: 10px;
  background: var(--accent); color: var(--surface); text-decoration: none;
}
.skip:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1264px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 20px;
  border: 1px solid transparent; border-radius: 10px;
  font: 500 16px/1.2 var(--font); text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #FDFDFB; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--raised); }
.btn-light { background: var(--on-dark); color: var(--text); }
.btn-light:hover { background: #E4E0D8; }
.btn-sm { min-height: 44px; padding: 10px 16px; font-size: 15px; }
.btn-icon { width: 48px; padding: 0; flex-shrink: 0; }

/* ---------- шапка ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: var(--surface); }

.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h);
  max-width: 1264px; margin-inline: auto; padding-inline: 20px;
}

.brand {
  display: flex; align-items: baseline; gap: 10px;
  margin-right: auto; text-decoration: none; min-height: 44px; align-content: center;
  flex-wrap: wrap;
}
.brand-name { font-size: 19px; font-weight: 600; color: var(--text); line-height: 44px; }
.brand-city { font: 400 13px/1 var(--mono); color: var(--text-3); }

.nav { display: none; gap: 2px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  border-radius: 8px; font-size: 15px; color: var(--text-2); text-decoration: none;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--raised); }

.lang { display: flex; gap: 2px; }
.lang button {
  min-width: 44px; min-height: 44px; padding: 0 8px;
  border: 0; border-radius: 8px; background: transparent;
  font: 400 13px/1 var(--mono); color: var(--text-3); cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--raised); color: var(--text); }
.site-header .header-inner > .lang { display: none; }

.header-phone {
  display: none; align-items: center; gap: 8px; min-height: 44px;
  font: 400 15px/1 var(--mono); color: var(--text); text-decoration: none; white-space: nowrap;
}
.header-phone .icon { color: var(--text-3); }
.header-cta { display: none; white-space: nowrap; }

.menu-btn {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }

.mobile-menu {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 20px 24px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .06);
}
.mobile-menu nav { display: grid; }
.mobile-menu nav a {
  display: flex; align-items: center; min-height: 52px;
  border-bottom: 1px solid var(--line);
  font-size: 18px; color: var(--text); text-decoration: none;
}
.mobile-menu-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.mobile-menu .header-phone { display: inline-flex; }

@media (min-width: 1100px) {
  .nav { display: flex; }
  .header-cta { display: inline-flex; }
  .site-header .header-inner > .lang { display: flex; }
  .menu-btn, .mobile-menu { display: none !important; }
  .header-inner { gap: 20px; padding-inline: 32px; }
}
@media (min-width: 1280px) {
  .header-inner > .header-phone { display: inline-flex; }
}

/* ---------- первый экран ---------- */

.hero {
  display: grid; gap: 24px;
  max-width: 1264px; margin-inline: auto;
  padding: 8px 20px 40px;
}
.hero-text { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(32px, 8.6vw, 44px);
  line-height: 1.06;
  text-wrap: balance;
}
.hero-lead {
  margin-top: 16px; max-width: 34rem;
  font-size: 18px; line-height: 1.55; color: var(--text-2);
}
.hero-actions { display: none; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-meta {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px;
  margin-top: 20px; font-size: 15px; color: var(--text-3);
}
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta li > span { min-width: 0; }
.hero-meta li { align-items: flex-start; }
.hero-meta .icon { margin-top: 4px; }
.hero-meta a { color: var(--text); text-decoration: none; }
.hero-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.status.is-open { color: var(--text-2); }

.hero-media {
  order: -1;
  position: relative; margin: 0;
  aspect-ratio: 5 / 4;
  border-radius: 12px; overflow: hidden;
  background: var(--raised);
}
.hero-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 52%;
}
.hero-cap {
  position: absolute; left: 12px; bottom: 12px;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 8px;
  background: rgba(253, 253, 251, .94);
  font-size: 14px; line-height: 1.3; color: var(--text);
}
.hero-cap .mono { color: var(--bronze); font-size: 13px; }


@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 56px;
    padding: 24px 32px 64px;
  }
  .hero-media {
    order: 0;
    aspect-ratio: 4 / 5;
    width: 100%;
    max-height: calc(100svh - 136px);
    min-height: 480px;
  }
  .hero h1 {
    font-size: clamp(40px, 4.4vw, 60px);
    line-height: 1.04;
    letter-spacing: -0.03em;
  }
  .hero-lead { margin-top: 20px; font-size: 19px; }
  .hero-actions { display: flex; margin-top: 32px; }
  .hero-meta { margin-top: 24px; }
}

/* ---------- строка фактов ---------- */

.facts { background: var(--surface); border-block: 1px solid var(--line); }
.facts-list { list-style: none; display: grid; grid-template-columns: 1fr; }
.facts-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
}
.facts-list li + li { border-top: 1px solid var(--line); }
@media (min-width: 560px) and (max-width: 959px) {
  .facts-list { grid-template-columns: 1fr 1fr; }
  .facts-list li { padding: 16px 0; }
  .facts-list li + li { border-top: 0; }
  .facts-list li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .facts-list li:nth-child(odd) { padding-right: 16px; }
  .facts-list li:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
}
.fact-ico {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px; background: var(--raised); color: var(--text-2);
}
.fact-t { display: block; font-size: 16px; line-height: 1.35; font-weight: 500; color: var(--text); }
.fact-d { display: block; font-size: 14px; line-height: 1.4; color: var(--text-3); }

@media (min-width: 960px) {
  .facts-list { grid-template-columns: repeat(4, 1fr); }
  .facts-list li,
  .facts-list li + li { padding: 28px 24px; border-top: 0; border-left: 1px solid var(--line); }
  .facts-list li:first-child { border-left: 0; padding-left: 0; }
}

/* ---------- секции ---------- */

.section { padding-block: 56px; }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head p { margin-top: 12px; font-size: 18px; color: var(--text-2); }
.section-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; max-width: none; }
h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; text-wrap: balance; }

@media (min-width: 960px) {
  .section { padding-block: 104px; }
  .section-head { margin-bottom: 48px; }
  h2 { letter-spacing: -0.02em; }
}

/* ---------- услуги ---------- */

.services-grid { display: grid; gap: 32px; }
.services-intro p.lead { margin-top: 12px; font-size: 18px; }
.decor {
  margin-top: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px 8px;
}
.decor-label { font: 400 14px/1.4 var(--mono); color: var(--text-3); margin-bottom: 4px; }
.decor-list { list-style: none; }
.decor-list li {
  display: flex; align-items: center; min-height: 44px;
  border-top: 1px solid var(--line);
  color: var(--text); font-size: 16px;
}
.decor-list li:first-child { border-top: 0; }

.service-list { list-style: none; border-top: 1px solid var(--line); }
.service {
  display: grid; grid-template-columns: 36px 1fr; gap: 4px 12px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.service-num { font: 400 14px/1.6 var(--mono); color: var(--text-3); padding-top: 2px; }
.service h3 { font-size: 20px; line-height: 1.3; }
.service p { margin-top: 8px; font-size: 16px; line-height: 1.55; }
.service-spec { grid-column: 2; margin-top: 8px; font: 400 14px/1.4 var(--mono); color: var(--text-3); }

@media (min-width: 960px) {
  .services-grid { grid-template-columns: 4fr 7fr; gap: 72px; }
  .services-intro { position: sticky; top: 96px; align-self: start; }
  .service { grid-template-columns: 48px 1fr 240px; gap: 4px 24px; padding: 24px 0; }
  .service-spec { grid-column: 3; grid-row: 1; margin-top: 4px; text-align: right; }
}

/* ---------- работы ---------- */

.works-grid { list-style: none; display: grid; gap: 16px; }
.work {
  display: grid; grid-template-columns: minmax(120px, 40%) 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden;
}
.work-photo {
  position: relative; display: block; width: 100%;
  min-height: 200px; padding: 0; border: 0;
  background: var(--raised); cursor: zoom-in; overflow: hidden;
}
.work-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work-photo:focus-visible { outline-offset: -4px; outline-color: var(--surface); }
.work-count {
  position: absolute; right: 8px; bottom: 8px;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 6px;
  background: rgba(28, 27, 26, .74); color: #FDFDFB;
  font: 400 13px/1.2 var(--mono);
  transition: background-color .15s var(--ease);
}
.work-photo:hover .work-count { background: rgba(28, 27, 26, .92); }
.work-body { padding: 16px; min-width: 0; }
.work h3 { font-size: 17px; line-height: 1.3; }
.work-spec { margin-top: 4px; font: 400 14px/1.4 var(--mono); color: var(--bronze); }
.work-desc { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--text-2); }

@media (min-width: 720px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .work { grid-template-columns: 1fr; align-content: start; }
  .work-photo { aspect-ratio: 4 / 5; min-height: 0; }
  .work-body { padding: 20px 20px 24px; }
  .work h3 { font-size: 20px; }
}
@media (min-width: 1024px) {
  .works-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

/* ---------- до и после ---------- */

.ba-grid { display: grid; gap: 32px; align-items: center; }
.checks { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
.checks li { display: flex; align-items: flex-start; gap: 12px; color: var(--text); }
.checks .icon { color: var(--text-3); margin-top: 3px; }
.ba-note { margin-top: 24px; font: 400 14px/1.5 var(--mono); color: var(--text-3); }

.ba-slider {
  --pos: 50%;
  position: relative; width: 100%; max-width: 560px; justify-self: center;
  aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
  background: var(--raised);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  cursor: ew-resize;
}
.ba-slider img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
}
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line {
  position: absolute; top: 0; bottom: 0; left: var(--pos);
  width: 2px; margin-left: -1px; background: #FDFDFB; pointer-events: none;
}
.ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; pointer-events: none;
}
.ba-grip {
  position: absolute; top: 50%; left: var(--pos);
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #FDFDFB; color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  pointer-events: none;
}
.ba-grip .icon:first-child { transform: rotate(90deg); margin-right: -3px; }
.ba-grip .icon:last-child { transform: rotate(-90deg); margin-left: -3px; }
.ba-range:focus-visible ~ .ba-grip { outline: 2px solid var(--text); outline-offset: 2px; }
.ba-tag {
  position: absolute; top: 12px;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(28, 27, 26, .74); color: #FDFDFB;
  font: 400 14px/1.3 var(--mono); pointer-events: none;
}
.ba-tag-before { left: 12px; }
.ba-tag-after { right: 12px; }

@media (min-width: 960px) {
  .ba-grid { grid-template-columns: 5fr 6fr; gap: 72px; }
  .ba-slider { justify-self: end; }
}

/* ---------- шаги ---------- */

.steps { background: var(--surface); border-block: 1px solid var(--line); }
.steps-list { list-style: none; display: grid; }
.steps-list li {
  display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.step-num { grid-row: span 2; padding-top: 3px; font: 400 15px/1.4 var(--mono); color: var(--bronze); }
.steps-list h3 { font-size: 19px; line-height: 1.35; }
.steps-list p { font-size: 16px; line-height: 1.55; }

@media (min-width: 960px) {
  .steps-list { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  .steps-list li { grid-template-columns: 1fr; align-content: start; padding-top: 20px; border-top-color: var(--line-strong); }
  .step-num { grid-row: auto; padding-top: 0; margin-bottom: 28px; }
  .steps-list p { margin-top: 8px; }
}

/* ---------- расчёт ---------- */

.calc { background: var(--dark); color: var(--on-dark-2); padding-block: 64px; }
.calc h2 { color: var(--on-dark); }
.calc :focus-visible { outline-color: var(--on-dark); }
.calc-grid { display: grid; gap: 32px; }
.calc-intro p { margin-top: 12px; font-size: 18px; }
.calc fieldset { margin: 0 0 28px; padding: 0; border: 0; min-width: 0; }
.calc legend {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 12px; padding: 0;
  font-size: 18px; font-weight: 500; color: var(--on-dark);
}
.calc legend .mono { font-size: 15px; font-weight: 400; color: var(--beige); }
.options { display: grid; grid-template-columns: 1fr; gap: 8px; }
.opt {
  position: relative; display: flex; align-items: center;
  min-height: 52px; padding: 12px 16px;
  border: 1px solid var(--dark-line); border-radius: 10px;
  background: var(--dark-raised); color: var(--on-dark);
  font-size: 16px; line-height: 1.35; cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.opt:hover { border-color: rgba(243, 243, 242, .3); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.opt.is-checked, .opt:has(input:checked) { background: var(--beige); border-color: var(--beige); color: var(--text); }
.opt:has(input:focus-visible) { outline: 2px solid var(--on-dark); outline-offset: 2px; }
.calc-send { margin-top: 4px; width: 100%; }

@media (min-width: 600px) {
  .options { grid-template-columns: 1fr 1fr; }
  .calc-send { width: auto; }
}
@media (min-width: 960px) {
  .calc { padding-block: 104px; }
  .calc-grid { grid-template-columns: 4fr 7fr; gap: 72px; }
}

/* ---------- отзывы ---------- */

.reviews-grid { list-style: none; display: grid; gap: 16px; }
.review {
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
}
.stars { display: flex; gap: 2px; color: var(--bronze); }
.review blockquote { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text); }
.review-meta { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.review-author { font-weight: 500; color: var(--text); }
.review-date { font: 400 14px/1.4 var(--mono); color: var(--text-3); }

@media (min-width: 960px) {
  .reviews-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .review { padding: 28px 32px; }
}

/* ---------- instagram ---------- */

.insta-grid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.insta-grid a {
  position: relative; display: block; aspect-ratio: 4 / 5;
  border-radius: 12px; overflow: hidden; background: var(--raised);
}
.insta-grid img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .15s var(--ease);
}
.insta-grid a:hover img { opacity: .86; }
.insta-grid a:focus-visible { outline-offset: 3px; }

@media (min-width: 960px) {
  .insta-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

/* ---------- вопросы ---------- */

.faq { background: var(--surface); border-block: 1px solid var(--line); }
.faq-grid { display: grid; gap: 24px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 16px 0;
  list-style: none; cursor: pointer;
  font-size: 18px; line-height: 1.4; font-weight: 500; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--text-3); transition: transform .18s var(--ease); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item p { max-width: 42rem; padding-bottom: 20px; }

@media (min-width: 960px) {
  .faq-grid { grid-template-columns: 4fr 7fr; gap: 72px; }
}

/* ---------- контакты ---------- */

.contacts-grid { display: grid; gap: 32px; }
.contacts-lead { margin-top: 12px; font-size: 18px; }
.contact-list { list-style: none; margin-top: 28px; border-top: 1px solid var(--line); }
.contact-list li {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.ico {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text-2);
}
.contact-label { display: block; font-size: 14px; line-height: 1.4; color: var(--text-3); }
.contact-val { display: block; font-size: 17px; line-height: 1.45; color: var(--text); text-decoration: none; }
a.contact-val { display: inline-flex; align-items: center; min-height: 32px; }
a.contact-val:hover { text-decoration: underline; text-underline-offset: 3px; }
.week { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font: 400 13px/1.5 var(--mono); color: var(--text-3); }
.week .is-today { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.contacts-info .status { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 15px; color: var(--text-2); }
.contacts-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.map-wrap { display: grid; gap: 12px; }
.map {
  aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--raised);
}
.map iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-wrap .btn { justify-self: start; }

@media (min-width: 960px) {
  .contacts-grid { grid-template-columns: 5fr 6fr; gap: 72px; align-items: start; }
  .map { aspect-ratio: 6 / 5; }
}

/* ---------- подвал ---------- */

.site-footer { border-top: 1px solid var(--line); padding-block: 40px; font-size: 15px; color: var(--text-3); }
.footer-inner { display: grid; gap: 16px; }
.footer-brand { font-size: 17px; font-weight: 600; color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-small { font-size: 14px; }

@media (min-width: 960px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; column-gap: 48px; }
  .footer-small { grid-column: 1 / -1; }
}

/* ---------- нижняя панель на телефоне ---------- */

.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
}
.mobile-bar .btn-primary { flex: 1; padding-inline: 12px; white-space: nowrap; }

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }
  .container { padding-inline: 32px; }
}

/* ---------- просмотр фото ---------- */

.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: #141312; color: var(--on-dark);
}
.viewer::backdrop { background: rgba(20, 19, 18, .6); }
.viewer[open] { display: grid; grid-template-rows: auto 1fr; }
.viewer-top { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.viewer-title { flex: 1; min-width: 0; font-weight: 500; color: var(--on-dark); }
.viewer-count { font: 400 14px/1 var(--mono); color: var(--on-dark-2); }
.viewer-btn {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--dark-line); border-radius: 10px;
  background: rgba(243, 243, 242, .06); color: var(--on-dark); cursor: pointer;
  transition: background-color .15s var(--ease);
}
.viewer-btn:hover { background: rgba(243, 243, 242, .14); }
.viewer-btn:focus-visible { outline-color: var(--on-dark); }
.viewer-stage {
  position: relative; display: grid; place-items: center;
  min-height: 0; padding: 0 16px 16px; touch-action: pan-y;
}
.viewer-img {
  max-width: 100%; max-height: calc(100dvh - 96px);
  width: auto; height: auto; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.viewer-prev, .viewer-next { position: absolute; top: 50%; margin-top: -22px; }
.viewer-prev { left: 16px; }
.viewer-next { right: 16px; }
.viewer-prev .icon { transform: scaleX(-1); }

/* ---------- движение ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .hero-text, .js .hero-media { animation: rise .5s var(--ease) both; }
  .js .hero-media { animation-delay: .06s; }
  .js .pre { opacity: 0; transform: translateY(10px); }
  .js .pre.in {
    opacity: 1; transform: none;
    transition: opacity .45s var(--ease) var(--d, 0ms), transform .45s var(--ease) var(--d, 0ms);
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}

.ba-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 20px;
  color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px;
  transition: text-decoration-color .15s var(--ease);
}
.ba-link:hover { text-decoration-color: currentColor; }
.ba-link .icon { color: var(--text-3); }
