/* ==========================================================================
   Криниця життя — Адаптивні стилі сайту (Django Static CSS)
   Кольорова палітра: Темно-синій (#0F172A), Блакитний (#0284C7), Світлий фон (#F8FAFC)
   ========================================================================== */

:root {
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent-primary: #0284c7;
  --accent-hover: #0369a1;
  --border-hairline: #e2e8f0;
  --danger: #dc2626;
  --success: #16a34a;
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-canvas);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Шапка сайту (3-Zone Top Bar Contract) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.brand-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition:
    color 150ms ease,
    border-color 150ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-primary);
  border-bottom-color: var(--accent-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  transition:
    transform 150ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 150ms ease,
    color 150ms ease;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.24);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-hairline);
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Головний екран */
.hero-section {
  position: relative;
  background-color: #0f172a;
  color: #ffffff;
  padding: 112px 0;
  overflow: hidden;
}

.hero-content {
  max-width: 720px;
}

.hero-kicker {
  font-size: 13px;
  color: #38bdf8;
  margin: 0 0 12px;
  font-weight: 500;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.15;
  margin: 0 0 20px;
  text-wrap: balance;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: #e2e8f0;
  margin: 0 0 32px;
  max-width: 62ch;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Секції */
.section {
  padding: 80px 0;
}

.section-alt {
  background-color: var(--bg-subtle);
}

.section-header {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-kicker {
  font-size: 13px;
  color: var(--accent-primary);
  font-weight: 600;
  margin: 0 0 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  margin: 0 0 12px;
  text-wrap: balance;
}

.section-lead {
  color: var(--text-secondary);
  margin: 0;
}

/* Каталог послуг */
.category-block {
  margin-bottom: 56px;
}

.category-header {
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-hairline);
}

.category-title {
  font-size: 22px;
  margin: 0 0 6px;
}

.category-description {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.service-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.service-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  gap: 6px;
}

.service-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px;
}

.service-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.service-included {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
}

.service-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-price-wrap {
  font-variant-numeric: tabular-nums;
}

.price-prefix {
  font-size: 13px;
  color: var(--text-muted);
}

.price-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 4px;
}

.price-currency {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Таблиця цін */
.price-table-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  overflow-x: auto;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.price-table th,
.price-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-hairline);
}

.price-table th {
  background-color: #f8fafc;
  font-weight: 600;
  color: var(--text-secondary);
}

.price-cell {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.text-right {
  text-align: right;
}

/* Форма заявки */
.form-wrapper {
  max-width: 760px;
  margin: 0 auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 15px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background-color: #ffffff;
  color: var(--text-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: 2px solid var(--accent-primary);
  border-color: transparent;
}

.field-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 4px;
}

/* Картки переваг */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.advantage-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 28px;
  transition:
    border-color 200ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.advantage-card:hover,
.service-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.08);
}

.advantage-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.advantage-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

.advantage-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Плавний ефект появи (fade-in) при прокручуванні вниз */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Інтерактивний повзунок «До та Після» */
.ba-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 28px;
}

.ba-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ba-slider {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  user-select: none;
  background-color: #0f172a;
}

.ba-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ba-before-layer {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--ba-pos, 50%)) 0 0);
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ba-pos, 50%);
  width: 2px;
  background-color: #ffffff;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 12px rgba(15, 23, 42, 0.45);
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background-color: #ffffff;
  color: var(--text-primary);
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.3);
}

.ba-badge {
  position: absolute;
  top: 14px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  color: #ffffff;
  background-color: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.ba-badge-before {
  left: 14px;
}

.ba-badge-after {
  right: 14px;
  background-color: rgba(2, 132, 199, 0.88);
}

.ba-range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}

.ba-info {
  padding: 20px 24px;
}

.ba-title {
  font-size: 18px;
  font-weight: 600;
  margin: 6px 0 8px;
}

.ba-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Адаптивність для планшетів і смартфонів */
@media (max-width: 768px) {
  .ba-grid {
    grid-template-columns: 1fr;
  }
  .main-nav {
    display: none;
  }
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-hairline);
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-wrapper {
    padding: 24px;
  }
}

:root {
  --bg-canvas: #f4f7f2;
  --bg-surface: #ffffff;
  --bg-subtle: #e8efe8;
  --text-primary: #183b34;
  --text-secondary: #405a52;
  --text-muted: #718078;
  --accent-primary: #d85e36;
  --accent-hover: #b94a28;
  --border-hairline: #d8e2d8;
}

body {
  background: var(--bg-canvas);
}
.site-header {
  background: rgba(248, 250, 246, 0.94);
  border-color: #d6e0d7;
}
.header-inner {
  gap: 18px;
}
.brand-logo {
  color: var(--text-primary);
}
.main-nav {
  gap: 20px;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}
.btn {
  border-radius: 5px;
}
.btn-primary {
  background: var(--accent-primary);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}
.btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.62);
}

.hero-section {
  padding: 54px 0;
  background: #183b34;
}
.hero-backdrop {
  display: none;
}
.hero-container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 56px;
}
.hero-content {
  max-width: 600px;
  padding: 36px 0;
}
.hero-kicker {
  color: #b9d8c7;
  letter-spacing: 0;
}
.hero-title {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.08;
}
.hero-subtitle {
  color: #d5e5dc;
  font-size: 17px;
}
.hero-buttons {
  gap: 12px;
}
.hero-photo {
  position: relative;
  height: 470px;
  margin: 0;
  overflow: hidden;
  background: #42685b;
}
.hero-photo::after {
  position: absolute;
  inset: 45% 0 0;
  content: "";
  background: linear-gradient(transparent, rgba(10, 28, 23, 0.76));
  pointer-events: none;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-photo figcaption {
  position: absolute;
  z-index: 1;
  bottom: 24px;
  left: 26px;
  right: 26px;
  display: grid;
  gap: 5px;
  color: white;
}
.hero-photo figcaption span {
  color: #d4e8da;
  font-size: 12px;
  text-transform: uppercase;
}
.hero-photo figcaption strong {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
}

.section {
  padding: 76px 0;
}
.section-title {
  font-size: clamp(28px, 3vw, 38px);
}
.section-header {
  margin-bottom: 38px;
}
.tools-section {
  background: #e9f0e9;
}
.tools-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 22px;
  align-items: stretch;
}
.calculator-panel,
.helper-panel {
  padding: 30px;
  border: 1px solid #d4dfd5;
  background: #fff;
}
.tool-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 26px;
}
.tool-index {
  flex: 0 0 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: #183b34;
  color: #fff;
  font: 500 13px var(--font-mono);
}
.tool-heading h3 {
  margin: 0 0 3px;
  font-size: 20px;
}
.tool-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}
.tool-label {
  display: block;
  margin: 18px 0 7px;
  font-size: 13px;
  font-weight: 700;
}
.form-select {
  border-color: #c9d6cc;
  border-radius: 4px;
  min-height: 46px;
}
.quantity-control {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  border: 1px solid #c9d6cc;
}
.quantity-control button {
  border: 0;
  background: #eff4ef;
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
}
.quantity-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-inline: 1px solid #c9d6cc;
  text-align: center;
  font: 600 16px var(--font-mono);
  color: var(--text-primary);
}
.estimate-label {
  margin: 24px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.estimate-total {
  display: block;
  margin: 2px 0 5px;
  font: 600 32px var(--font-mono);
  color: var(--text-primary);
}
.estimate-note {
  min-height: 40px;
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 12px;
}
.calculator-cta {
  width: 100%;
}
.helper-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.helper-option {
  position: relative;
  min-height: 100px;
  padding: 15px;
  display: grid;
  align-content: start;
  gap: 5px;
  text-align: left;
  color: var(--text-primary);
  background: #f5f8f4;
  border: 1px solid #e0e8e0;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}
.helper-option:hover,
.helper-option.is-selected {
  border-color: var(--accent-primary);
  background: #fff5ef;
  transform: translateY(-2px);
}
.helper-option span {
  color: var(--accent-primary);
  font: 500 11px var(--font-mono);
}
.helper-option strong {
  font-size: 14px;
  line-height: 1.35;
}
.helper-option small {
  color: var(--text-muted);
  font-size: 11px;
}
.helper-result {
  min-height: 60px;
  margin-top: 18px;
  padding: 14px 16px;
  background: #e9f0e9;
  color: var(--text-secondary);
  font-size: 13px;
}
.helper-result strong {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
}
.helper-result p {
  margin: 3px 0 9px;
}
.helper-result-action {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-hover);
  font: 700 12px var(--font-sans);
  text-decoration: underline;
  cursor: pointer;
}

.category-title {
  color: var(--text-primary);
}
.service-card {
  border-radius: 5px;
  border-color: #dce5dc;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 32px rgba(24, 59, 52, 0.1);
}
.service-card-media {
  height: 210px;
  overflow: hidden;
}
.service-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service-card-body {
  padding: 22px;
}
.service-title {
  color: var(--text-primary);
}
.price-value {
  color: var(--accent-hover);
}
.price-table-wrapper {
  border-radius: 4px;
  border-color: #d8e2d8;
}
.price-table th {
  background: #e9f0e9;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 54px;
  align-items: center;
}
.about-image {
  display: block;
  width: 100%;
  max-height: 450px;
  object-fit: cover;
}
.about-text,
.about-list {
  color: var(--text-secondary);
}
.about-list {
  padding-left: 20px;
}
.about-list li {
  margin: 10px 0;
}
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
}
.advantage-card {
  padding: 24px 20px;
  border-right: 1px solid var(--border-hairline);
}
.advantage-card:last-child {
  border-right: 0;
}
.advantage-index {
  color: var(--accent-primary);
  font: 500 12px var(--font-mono);
}
.advantage-title {
  font-size: 16px;
}
.advantage-description,
.step-description {
  color: var(--text-muted);
  font-size: 13px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-item {
  position: relative;
  height: 340px;
  margin: 0;
  overflow: hidden;
  background: #d8e2d8;
  cursor: zoom-in;
}
.gallery-video-item {
  display: flex;
  height: auto;
  flex-direction: column;
  cursor: default;
}
.gallery-video {
  flex: 1 1 auto;
  width: 100%;
  min-height: 180px;
  display: block;
  object-fit: contain;
  background: #101714;
}
.gallery-video-item .gallery-caption {
  position: static;
  flex: 0 0 auto;
  padding: 12px 16px;
  background: #1c3027;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gallery-item:hover img {
  transform: scale(1.045);
}
.gallery-caption {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 4px;
  padding: 45px 18px 17px;
  color: #fff;
  background: linear-gradient(transparent, rgba(13, 35, 28, 0.84));
}
.gallery-category {
  color: #d4e8da;
  font-size: 11px;
}
.gallery-title {
  font-size: 16px;
}
.gallery-item:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 3px;
}
body.modal-open {
  overflow: hidden;
}
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: #f4f7f2;
  background: rgba(8, 16, 14, 0.94);
  backdrop-filter: blur(8px);
}
.lightbox-modal.is-active {
  display: flex;
  animation: lightbox-appear 180ms ease-out both;
}
.lightbox-content {
  width: min(100%, 1120px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(220, 232, 222, 0.16);
  background: #14231e;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}
.lightbox-toolbar {
  min-height: 48px;
  padding: 7px 12px 7px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #b9c9c0;
  font-size: 12px;
}
.lightbox-zoom,
.lightbox-close {
  color: #fff;
  border: 1px solid rgba(230, 241, 233, 0.28);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.lightbox-zoom {
  min-height: 34px;
  padding: 5px 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 600 12px var(--font-sans);
}
.lightbox-zoom span {
  color: #f18a63;
  font-size: 18px;
  line-height: 1;
}
.lightbox-image-frame {
  width: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  background: #0d1512;
}
#lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(70vh, 760px);
  object-fit: contain;
}
.lightbox-image-frame.is-zoomed {
  display: block;
  cursor: grab;
}
.lightbox-image-frame.is-zoomed #lightbox-image {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}
.lightbox-caption {
  min-height: 102px;
  padding: 16px 22px 20px;
  background: #172820;
}
.lightbox-category {
  display: block;
  margin-bottom: 4px;
  color: #ea8060;
  font-size: 12px;
}
.lightbox-caption h2 {
  margin: 0;
  color: #f7faf7;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.3;
}
.lightbox-caption p {
  max-width: 75ch;
  margin: 5px 0 0;
  color: #c4d2c9;
  font-size: 13px;
  line-height: 1.55;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  width: 42px;
  height: 42px;
  font-size: 29px;
  line-height: 1;
}
.lightbox-close:hover,
.lightbox-zoom:hover {
  background: rgba(255, 255, 255, 0.17);
}
.lightbox-close:focus-visible,
.lightbox-zoom:focus-visible {
  outline: 2px solid #f18a63;
  outline-offset: 2px;
}
@keyframes lightbox-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.gallery-empty-placeholder,
.comparison-empty {
  padding: 28px;
  border: 1px dashed #aabaae;
  color: var(--text-muted);
}
.comparison-section {
  background: #183b34;
  color: white;
}
.comparison-section .section-title {
  color: white;
}
.comparison-section .section-lead {
  color: #d5e5dc;
}
.comparison-section .section-kicker {
  color: #b9d8c7;
}
.comparison-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.comparison-item {
  min-width: 0;
  color: var(--text-primary);
  background: #fff;
  border: 1px solid #d8e2d8;
}
.comparison-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #34564c;
  --compare-position: 50%;
}
.comparison-frame > img,
.comparison-before-wrap,
.comparison-before-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.comparison-before-wrap {
  clip-path: inset(0 calc(100% - var(--compare-position)) 0 0);
}
.comparison-before-wrap img {
  display: block;
}
.comparison-tag {
  position: absolute;
  top: 14px;
  z-index: 2;
  max-width: calc(50% - 24px);
  padding: 5px 9px;
  overflow: hidden;
  color: #fff;
  background: #172820;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comparison-tag-before {
  left: 14px;
}
.comparison-tag-after {
  right: 14px;
  background: #087eb5;
}
.comparison-handle {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: var(--compare-position);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid #087eb5;
  border-radius: 10px;
  color: #087eb5;
  background: #fff;
  padding: 0;
  font-size: 21px;
  cursor: ew-resize;
  touch-action: none;
}
.comparison-handle:focus-visible {
  outline: 3px solid #f18a63;
  outline-offset: 3px;
}
.comparison-controls {
  min-height: 48px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
  border: 1px solid #d8e2d8;
  border-top: 0;
}
.comparison-show-side {
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid #cbd8cd;
  color: var(--text-primary);
  background: #fff;
  font: 600 11px var(--font-sans);
  cursor: pointer;
}
.comparison-show-side:hover,
.comparison-show-side:focus-visible {
  border-color: #087eb5;
  color: #087eb5;
}
.comparison-output {
  color: var(--text-primary);
  font: 600 12px var(--font-mono);
  white-space: nowrap;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.comparison-frame::after {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: var(--compare-position);
  width: 2px;
  content: "";
  background: white;
  pointer-events: none;
}
.comparison-caption h3 {
  margin: 14px 0 4px;
  padding: 0 18px;
  font-size: 17px;
  color: var(--text-primary);
}
.comparison-caption p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--text-secondary);
  font-size: 13px;
}
.comparison-empty {
  display: flex;
  gap: 18px;
  align-items: center;
  color: #d5e5dc;
  border-color: #698578;
}
.comparison-empty-mark {
  font: 32px var(--font-mono);
  color: #b9d8c7;
}
.comparison-empty strong {
  color: white;
}
.comparison-empty p {
  margin: 4px 0 0;
  font-size: 13px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0;
  list-style: none;
}
.step-card {
  padding: 20px;
  border-top: 2px solid #c5d5c8;
}
.step-number {
  color: var(--accent-primary);
  font: 500 12px var(--font-mono);
}
.step-title {
  font-size: 16px;
}
.faq-layout {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 72px;
}
.faq-intro {
  max-width: 350px;
}
.faq-list {
  border-top: 1px solid #cbd8cd;
}
.faq-item {
  border-bottom: 1px solid #cbd8cd;
}
.faq-item summary {
  position: relative;
  padding: 19px 36px 19px 0;
  color: var(--text-primary);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  position: absolute;
  right: 4px;
  content: "+";
  color: var(--accent-primary);
  font: 400 24px var(--font-sans);
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item p {
  max-width: 70ch;
  margin: -3px 36px 20px 0;
  color: var(--text-secondary);
  font-size: 14px;
}
.form-wrapper {
  border-radius: 5px;
  border-color: #d8e2d8;
}
.form-input,
.form-select,
.form-textarea {
  border-radius: 4px;
}
.js-motion .reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 550ms ease,
    transform 550ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js-motion .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1000px) {
  .main-nav {
    gap: 12px;
  }
  .nav-link {
    font-size: 12px;
  }
  .header-actions .btn {
    display: none;
  }
  .hero-container {
    gap: 28px;
  }
  .hero-photo {
    height: 400px;
  }
  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }
  .advantages-grid {
    grid-template-columns: 1fr 1fr;
  }
  .advantage-card:nth-child(2) {
    border-right: 0;
  }
  .advantage-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border-hairline);
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 62px;
  }
  .main-nav {
    display: none;
  }
  .main-nav.is-open {
    display: flex;
    top: 62px;
    gap: 0;
    background: #f8faf6;
  }
  .main-nav.is-open .nav-link {
    width: 100%;
    padding: 10px 0;
    font-size: 14px;
  }
  .header-actions .btn {
    display: inline-flex;
  }
  .hero-section {
    padding: 28px 0 34px;
  }
  .hero-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-content {
    padding: 14px 0 0;
  }
  .hero-title {
    font-size: 38px;
  }
  .hero-photo {
    height: min(58vw, 360px);
    min-height: 230px;
  }
  .hero-photo figcaption {
    left: 17px;
    bottom: 16px;
  }
  .hero-photo figcaption strong {
    font-size: 18px;
  }
  .section {
    padding: 58px 0;
  }
  .tools-grid,
  .about-grid,
  .faq-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .comparison-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .calculator-panel,
  .helper-panel {
    padding: 22px;
  }
  .services-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .gallery-item {
    height: 260px;
  }
  .lightbox-modal {
    padding: 10px;
  }
  .lightbox-content {
    width: 100%;
  }
  .lightbox-toolbar {
    min-height: 44px;
    padding-left: 10px;
  }
  .lightbox-hint {
    max-width: 45%;
    font-size: 10px;
  }
  #lightbox-image {
    max-height: 64vh;
  }
  .lightbox-caption {
    min-height: 88px;
    padding: 13px 15px 16px;
  }
  .lightbox-caption h2 {
    font-size: 18px;
  }
  .lightbox-caption p {
    font-size: 12px;
  }
  .lightbox-close {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
  }
  .steps-grid {
    grid-template-columns: 1fr 1fr;
  }
  .faq-layout {
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }
  .brand-logo {
    font-size: 18px;
  }
  .header-inner {
    gap: 8px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .btn {
    padding: 8px 10px;
    font-size: 11px;
  }
  .hero-title {
    font-size: 33px;
  }
  .hero-subtitle {
    font-size: 15px;
  }
  .hero-buttons .btn {
    white-space: normal;
    text-align: center;
  }
  .helper-options {
    grid-template-columns: 1fr;
  }
  .helper-option {
    min-height: auto;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-item {
    height: 300px;
  }
  .advantages-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .advantage-card {
    border-right: 0;
    border-bottom: 1px solid var(--border-hairline);
  }
  .advantage-card:last-child {
    border-bottom: 0;
  }
  .advantage-card:nth-child(2) {
    border-bottom: 1px solid var(--border-hairline);
  }
  .step-card {
    padding-left: 0;
  }
}

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