/* Spangar theme — visual language of the legacy spangar.ru Astro site
   re-expressed on Progressive CMS theme tokens. Glass design: Prosto One
   display + Roboto body, salmon accent, translucent panels. Light/dark via
   html[data-theme] (boot + toggle in assets/js/theme.js). Icons: full local
   Font Awesome Free (assets/fontawesome, no CDN). No other frameworks. */

/* ── Fonts (self-hosted) ─────────────────── */
@font-face {
  font-family: "Prosto One";
  src: url("../fonts/ProstoOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── Theme surfaces (mirror legacy :root light + [data-theme=dark]) ─────── */
/* Dark values live in tokens/base.json (emitted as :root by tokens_css).
   These blocks restate the full set per theme so the palette is explicit
   and independent of emission order. */
html[data-theme="light"] {
  color-scheme: light;
  --color-bg: #f7f8fb;
  --color-bg-strong: #e7ecf6;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-surface: rgba(255, 255, 255, 0.95);
  --color-surface-muted: #eef2f9;
  --color-glass: rgba(255, 255, 255, 0.9);
  --color-border: rgba(15, 23, 42, 0.08);
  --color-field-bg: rgba(255, 255, 255, 0.9);
  --color-field-border: rgba(15, 23, 42, 0.12);
  --shadow-card: 0 25px 90px rgba(15, 23, 42, 0.12);
  --hero-gradient-from: rgba(255, 255, 255, 0.64);
  --hero-gradient-to: rgba(231, 236, 246, 0.48);
  --hero-chip-bg: rgba(255, 255, 255, 0.92);
  --hero-chip-border: rgba(148, 163, 184, 0.35);
  --hero-chip-text: var(--color-text);
  --hero-card-bg: rgba(255, 255, 255, 0.92);
  --hero-card-border: rgba(15, 23, 42, 0.08);
  --section-gradient-from: rgba(248, 250, 255, 0.95);
  --section-gradient-to: rgba(228, 233, 247, 0.85);
  --section-overlay: rgba(255, 255, 255, 0.8);
  --section-note-bg: rgba(255, 255, 255, 0.85);
  --section-progress-bg: rgba(15, 23, 42, 0.08);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --hero-gradient-from: rgba(2, 6, 23, 0.75);
  --hero-gradient-to: rgba(8, 15, 40, 0.58);
  --hero-chip-bg: rgba(8, 15, 40, 0.5);
  --hero-chip-border: rgba(255, 255, 255, 0.18);
  --hero-chip-text: #f8fafc;
  --hero-card-bg: rgba(5, 9, 20, 0.6);
  --hero-card-border: rgba(255, 255, 255, 0.18);
  --section-gradient-from: rgba(4, 7, 18, 0.95);
  --section-gradient-to: rgba(15, 23, 42, 0.9);
  --section-overlay: rgba(5, 9, 20, 0.8);
  --section-note-bg: rgba(7, 12, 27, 0.72);
  --section-progress-bg: rgba(255, 255, 255, 0.12);
}
/* Fallback (no data-theme attr yet / no-JS): light like the reference. */
:root {
  --hero-gradient-from: rgba(255, 255, 255, 0.64);
  --hero-gradient-to: rgba(231, 236, 246, 0.48);
  --hero-chip-bg: rgba(255, 255, 255, 0.92);
  --hero-chip-border: rgba(148, 163, 184, 0.35);
  --hero-chip-text: var(--color-text);
  --hero-card-bg: rgba(255, 255, 255, 0.92);
  --hero-card-border: rgba(15, 23, 42, 0.08);
  --section-gradient-from: rgba(248, 250, 255, 0.95);
  --section-gradient-to: rgba(228, 233, 247, 0.85);
  --section-overlay: rgba(255, 255, 255, 0.8);
  --section-note-bg: rgba(255, 255, 255, 0.85);
  --section-progress-bg: rgba(15, 23, 42, 0.08);
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
/* Full-bleed sections (home hero) break out to 100vw; clip the scrollbar-
   width overshoot so no horizontal scrollbar appears. */
body {
  overflow-x: clip;
}
/* All native controls (checkboxes, radios, ranges, select highlights) use
   the brand accent instead of the OS default blue. */
:root {
  accent-color: var(--color-primary, #d46161);
}
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.08), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(27, 44, 82, 0.12), transparent 25%),
    linear-gradient(135deg, var(--color-bg), var(--color-bg-strong));
  background-attachment: fixed;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--font-size-m);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--color-primary);
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  margin: 0 0 var(--space-s);
}
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: currentColor;
}
.text-muted {
  color: var(--color-text-muted);
}

.container {
  /* container_width is the CONTENT width (what you measure in DevTools);
     border-box puts the inline padding inside max-width, so add it back. */
  max-width: calc(var(--layout-container-width, 1200) * 1px + var(--space-m) * 2);
  margin-inline: auto;
  padding-inline: var(--space-m);
}
.page-main {
  padding-top: calc(var(--layout-header-height) + var(--space-l));
  padding-bottom: var(--space-xl);
  min-height: 60vh;
}
.page-title {
  font-size: clamp(2rem, 5vw, 3.75rem);
}
.page-intro {
  color: var(--color-text-muted);
  font-size: var(--font-size-l);
  max-width: 46rem;
}

/* ── Service page: USP grid, lead, body illustration ────────────────────── */
.service-usp {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-m);
  list-style: none;
  margin: 0 0 var(--space-l);
  padding: 0;
}
.service-usp-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-m);
  padding: var(--space-m);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  background: var(--color-glass);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
}
.service-usp-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-primary);
  font-size: 1.125rem;
}
.service-usp-title {
  margin: 0;
  font-size: 1.25rem;
}
.service-usp-text {
  margin: var(--space-2xs) 0 0;
  color: var(--color-text-muted);
}
.service-lead {
  max-width: 52rem;
  margin-bottom: var(--space-l);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 600;
  line-height: 1.45;
}
.service-lead p {
  margin: 0 0 var(--space-s);
}
.service-lead p:last-child {
  margin-bottom: 0;
}
.service-body-image {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-m);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-l);
}
@media (max-width: 767px) {
  .service-usp {
    grid-template-columns: 1fr;
  }
}

/* Logo variants: black logo for light, white for dark (legacy logo-light /
   logo-dark classes). Header and footer render both; CSS picks one. */
.logo-dark {
  display: none !important;
}
html[data-theme="dark"] .logo-light {
  display: none !important;
}
html[data-theme="dark"] .logo-dark {
  display: block !important;
}

/* The wizard and relocated fragments rely on the hidden attribute; author
   display rules must not resurrect hidden elements. */
[hidden] {
  display: none !important;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-s);
  padding: 0.75rem 1.5rem;
  font-size: var(--font-size-l);
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}
.btn:hover {
  text-decoration: none;
}
.btn-sm {
  padding: 0.55rem 1.15rem;
  font-size: var(--font-size-m);
}
.btn-primary,
.btn-gradient {
  color: var(--color-primary-contrast);
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary-soft));
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover,
.btn-gradient:hover {
  color: var(--color-primary-contrast);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 20px 45px var(--color-primary-muted);
}
.btn-ghost {
  color: inherit;
  border-color: color-mix(in srgb, currentColor 35%, transparent);
  background: color-mix(in srgb, currentColor 8%, transparent);
}
.btn-ghost:hover {
  background: color-mix(in srgb, currentColor 16%, transparent);
  transform: translateY(-1px);
}
.btn-outline {
  color: var(--color-text);
  border-color: color-mix(in srgb, var(--color-text) 18%, transparent);
  background: transparent;
}
.btn-outline:hover {
  background: color-mix(in srgb, var(--color-primary) 20%, transparent);
  transform: translateY(-1px);
}
html[data-theme="dark"] .btn-outline {
  border-color: color-mix(in srgb, var(--color-text) 30%, transparent);
}

/* ── Header: floating glass pill ────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: var(--z-header);
}
.header-glass {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  margin-top: var(--space-s);
  padding: var(--space-s) var(--space-m);
  background: var(--color-glass);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-m);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
}
.header-logo {
  display: inline-flex;
  flex-shrink: 0;
}
.logo-tile {
  display: block;
  height: 4rem;
  width: auto;
  border-radius: var(--radius-s);
}
.header-nav {
  display: none;
  align-items: center;
  gap: var(--space-l);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--font-size-m);
  font-weight: 600;
}
.header-nav .group {
  position: relative;
}
.header-nav .group > ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 12rem;
  padding: var(--space-xs);
  list-style: none;
  background: var(--color-glass);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  backdrop-filter: blur(8px);
}
.header-nav .group:hover > ul {
  display: block;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: var(--radius-round);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.theme-toggle:hover {
  transform: scale(1.05);
  color: var(--color-primary);
}
.header-phone {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-round);
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, currentColor 8%, transparent);
  color: var(--color-text);
  cursor: pointer;
}
.menu-toggle .icon-close {
  display: none;
}
.menu-toggle[aria-expanded="true"] .icon-burger {
  display: none;
}
.menu-toggle[aria-expanded="true"] .icon-close {
  display: inline-block;
}
.mobile-nav {
  display: none;
}
.mobile-nav[data-open="true"] {
  display: block;
  margin-top: var(--space-xs);
  padding-bottom: var(--space-s);
}
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: var(--space-s);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  background: var(--color-glass);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  backdrop-filter: blur(8px);
}
.mobile-nav .group > ul {
  list-style: none;
  padding-left: var(--space-s);
}
.mobile-nav hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 0;
}
@media (min-width: 1024px) {
  .header-nav {
    display: flex;
  }
  .header-phone {
    display: inline-flex;
  }
  .menu-toggle,
  .mobile-nav {
    display: none !important;
  }
}
.mobile-nav .header-phone {
  display: inline-flex;
}
.mobile-nav .theme-toggle-row {
  display: flex;
  justify-content: flex-end;
}
/* Narrow screens: the CTA and toggle live in the mobile panel, the header
   keeps logo + burger (reference mobile behavior). */
@media (max-width: 767px) {
  .header-actions .btn-primary {
    display: none;
  }
  .logo-tile {
    height: 3rem;
  }
}
@media (max-width: 400px) {
  .header-actions .theme-toggle {
    display: none;
  }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  /* Full-bleed: the home layout constrains sections to the container, the
     hero breaks out to the viewport edge (image spans the whole screen;
     body{overflow-x:clip} absorbs the scrollbar-width overshoot of 100vw). */
  width: 100vw;
  max-width: none;
  margin-inline: calc(50% - 50vw);
  color: #f8fafc;
  background-color: #050b18;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center;
  padding-top: calc(var(--layout-header-height) + var(--space-l));
  padding-bottom: var(--space-xl);
}
html[data-theme="light"] .hero {
  color: var(--color-text);
  background-color: #f4f7fc;
}
/* Server-rendered first slide — CSP-safe replacement for the inline
   `style="--hero-image:…"` attribute that style-src (style attributes carry
   no hash) blocked on prod. Paints under .hero-overlay; the JS slideshow
   hides it once its CSSOM rotation takes over (CSP allows CSSOM). */
.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero--rotating .hero-media {
  display: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--hero-gradient-from), var(--hero-gradient-to));
}
.hero-glow {
  position: absolute;
  border-radius: var(--radius-round);
  filter: blur(140px);
  opacity: 0.65;
  pointer-events: none;
}
.hero-glow--warm {
  left: -6rem;
  top: -8rem;
  width: 28rem;
  height: 28rem;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.45), transparent 70%);
}
.hero-glow--cool {
  right: -6rem;
  bottom: 0;
  width: 32rem;
  height: 32rem;
  background: radial-gradient(circle at center, rgba(30, 64, 175, 0.55), transparent 70%);
}
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
}
.hero-heading {
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.1;
  margin: 0;
}
.hero-subtitle {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: rgba(248, 250, 252, 0.85);
  max-width: 46rem;
  margin: 0;
}
html[data-theme="light"] .hero .hero-subtitle {
  color: var(--color-text-muted);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
}
.hero-ctas .btn {
  padding: 1rem 2rem;
  font-size: var(--font-size-l);
}
.hero-ctas .btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}
html[data-theme="light"] .hero .btn-ghost {
  border-color: rgba(15, 23, 42, 0.15);
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-s);
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-s);
  border-radius: var(--radius-m);
  background: var(--hero-card-bg);
  border: 1px solid var(--hero-card-border);
  backdrop-filter: blur(26px);
  box-shadow: 0 25px 60px rgba(3, 7, 18, 0.25);
}
html[data-theme="light"] .hero-stat {
  box-shadow: 0 20px 65px rgba(15, 23, 42, 0.12);
}
.hero-stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--color-primary);
  /* Equal-width digits keep the number from wobbling frame-by-frame while
     the count-up animation runs (which resizes the hero card row). */
  font-variant-numeric: tabular-nums;
}
/* Count-up sizer (armed by theme.js): the hidden ::before copy of the final
   text reserves the exact final box (reflows with webfonts on its own); the
   live number overlays it absolutely, so digit changes are layout-neutral. */
.count-armed {
  position: relative;
}
.count-armed::before {
  content: attr(data-target);
  visibility: hidden;
  display: block;
}
.count-armed .count-live {
  position: absolute;
  inset: 0;
}
.hero-stat-label {
  color: rgba(248, 250, 252, 0.8);
}
html[data-theme="light"] .hero .hero-stat-label {
  color: var(--color-text-muted);
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-round);
  font-size: 0.875rem;
  background: var(--hero-chip-bg);
  border: 1px solid var(--hero-chip-border);
  color: var(--hero-chip-text);
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-round);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  font-weight: 600;
  background: var(--hero-chip-bg);
  border: 1px solid var(--hero-chip-border);
  color: var(--hero-chip-text);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 45px rgba(3, 7, 18, 0.2);
}
.hero-dots {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--space-m);
}
.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  padding: 0;
  border-radius: var(--radius-round);
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease;
}
html[data-theme="light"] .hero-dot {
  border-color: rgba(0, 0, 0, 0.3);
}
.hero-dot.active {
  background: #fff;
}
html[data-theme="light"] .hero-dot.active {
  background: var(--color-text);
}
@media (min-width: 768px) {
  .hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hero-stat {
    padding: var(--space-m);
  }
}

/* ── Scroll reveal (JS adds .js-reveal so no-JS stays visible) ──────────── */
.js-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.js-reveal[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

/* ── Sections ───────────────────────────────────────────────────────────── */
.section {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-xl);
}
.section--tint {
  background: var(--color-bg-strong);
}
.section-shell {
  position: relative;
  overflow: hidden;
  color: var(--color-text);
}
.section-shell::before,
.section-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.section-shell::before {
  background: linear-gradient(135deg, var(--section-gradient-from), var(--section-gradient-to));
}
.section-shell::after {
  background: var(--section-overlay);
}
.section-shell > * {
  position: relative;
  z-index: 1;
}
.section-glow {
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: var(--radius-round);
  filter: blur(140px);
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}
.section-glow--warm {
  background: color-mix(in srgb, var(--color-primary) 20%, transparent);
}
.section-glow--cool {
  background: color-mix(in srgb, var(--color-primary) 15%, white);
}
html[data-theme="dark"] .section-glow--warm {
  background: color-mix(in srgb, var(--color-primary) 30%, transparent);
}
html[data-theme="dark"] .section-glow--cool {
  background: color-mix(in srgb, var(--color-primary) 20%, white);
}
.section-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-m);
  margin-bottom: var(--space-l);
}
.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 1.25rem;
  border-radius: var(--radius-round);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  font-weight: 600;
  background: var(--hero-chip-bg);
  border: 1px solid var(--hero-chip-border);
  color: var(--hero-chip-text);
}
.eyebrow-text {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
}
.section-title {
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  margin: var(--space-xs) 0 0;
}
.section-subtitle {
  font-size: var(--font-size-l);
  color: var(--color-text-muted);
  max-width: 46rem;
  margin: var(--space-xs) 0 0;
}
.section-note {
  margin-top: var(--space-l);
  text-align: center;
  background: var(--section-note-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(3, 7, 18, 0.15);
}
.section-note .pill {
  display: inline-flex;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-m);
  font-weight: 600;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: var(--space-m);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
}
.card--hover {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 65px rgba(3, 7, 18, 0.35);
}
.card-grid {
  display: grid;
  gap: var(--space-m);
}
@media (min-width: 768px) {
  .card-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Service / project cards (related_content) — reference glass card with
   image, kind chip and full-width CTA. */
.image-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius-l);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--color-glass);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
}
.image-card__media {
  position: relative;
  height: 17rem;
  overflow: hidden;
  background: var(--color-surface-muted);
}
html[data-theme="dark"] .image-card__media {
  background: #1e293b;
}
.image-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.image-card:hover .image-card__media img {
  transform: scale(1.1);
}
.image-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}
.image-card__chip {
  position: absolute;
  bottom: var(--space-s);
  left: var(--space-s);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-s);
  background: color-mix(in srgb, var(--color-glass) 80%, white);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.image-card__chip::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-round);
  background: var(--color-primary);
}
.image-card__chip--dark {
  background: color-mix(in srgb, #050b18 80%, transparent);
  color: #fff;
  border: 1px solid color-mix(in srgb, #0f172a 65%, transparent);
  border-radius: var(--radius-round);
  text-transform: capitalize;
  font-size: 0.75rem;
}
html[data-theme="light"] .image-card__chip--dark {
  background: color-mix(in srgb, #0f172a 70%, transparent);
  color: #f8fafc;
}
.image-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  padding: var(--space-m);
  flex: 1;
}
.image-card__title {
  font-size: 1.5rem;
  margin: 0;
}
.image-card__text {
  color: var(--color-text-muted);
  font-size: var(--font-size-l);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.image-card__metrics {
  display: flex;
  justify-content: space-between;
  gap: var(--space-s);
  padding-top: var(--space-s);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.image-card__metrics strong {
  color: var(--color-text);
}
.image-card__price {
  font-family: var(--font-heading);
  font-size: 1.875rem;
  color: var(--color-primary);
  margin: 0;
}
.image-card__action {
  margin-top: auto;
}
.image-card__action .btn {
  width: 100%;
}

/* ── Blog cards ─────────────────────────────────────────────────────────── */
.blog-card {
  background: var(--section-card-bg, var(--color-surface));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 65px rgba(3, 7, 18, 0.18);
}
.blog-card__media {
  position: relative;
  height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.blog-card:hover .blog-card__media img {
  transform: scale(1.08);
}
.blog-card__media--placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: rgba(248, 250, 252, 0.75);
  background: linear-gradient(135deg, #1e293b, #0f172a);
}
html[data-theme="light"] .blog-card__media--placeholder {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #475569;
}
.blog-card__media--placeholder i {
  font-size: 2.25rem;
  opacity: 0.8;
}
.blog-card__media--placeholder span {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.blog-card__category {
  position: absolute;
  top: var(--space-s);
  left: var(--space-s);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-round);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}
.blog-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: var(--space-m);
  flex: 1;
}
.blog-card__date {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.blog-card__title {
  font-size: 1.5rem;
  margin: 0;
}
.blog-card__teaser {
  color: var(--color-text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__action {
  margin-top: auto;
}
.blog-card__action .btn {
  width: 100%;
}

/* ── Advantages («Почему выбирают СПАНГАР»): list@1 rework ──────────────── */
.advantages-layout {
  display: grid;
  gap: var(--space-l);
  align-items: start;
}
.block-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-m);
}
.block-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-s);
  background: var(--color-glass);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-m);
  padding: var(--space-m);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.block-list li:hover {
  transform: translateY(-4px);
}
.block-list li strong {
  display: block;
  margin-bottom: var(--space-2xs);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
}
.block-list li p {
  margin: 0;
  color: var(--color-text-muted);
}
.block-list li .btn {
  margin-top: var(--space-xs);
}
.advantage-icon {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  border-radius: var(--radius-s);
}
.advantage-icon img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}
.advantage-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-s);
}
.advantage-collage figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-l);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--color-glass);
  box-shadow: var(--shadow-card);
}
.advantage-collage figure:nth-child(even) {
  margin-top: var(--space-m);
}
.advantage-collage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  transition: transform 0.7s ease;
}
.advantage-collage img:hover {
  transform: scale(1.05);
}
@media (min-width: 768px) {
  .block-list ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .advantages-layout--with-collage {
    grid-template-columns: 2fr 1fr;
  }
}

/* ── Timeline (Process) — reference zig-zag around a central axis ───────── */
.timeline {
  position: relative;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
  max-width: 56rem;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2rem;
  width: 2px;
  background: linear-gradient(180deg, var(--color-primary), transparent 90%);
  opacity: 0.5;
}
.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-s);
}
.timeline-icon {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--color-primary);
  z-index: 1;
}
.timeline-icon img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}
.timeline-card {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  background: var(--section-card-bg, var(--color-surface));
  backdrop-filter: blur(18px);
  box-shadow: 0 25px 65px rgba(3, 7, 18, 0.22);
  padding: var(--space-m);
}
.timeline-date {
  display: inline-flex;
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-round);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}
.timeline-title {
  margin: 0 0 var(--space-2xs);
  font-size: 1.5rem;
}
.timeline-text {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-l);
}
@media (min-width: 640px) {
  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }
  .timeline-item {
    flex-direction: row;
    align-items: center;
    gap: var(--space-l);
  }
  .timeline-item > .timeline-icon {
    width: 8rem;
    display: flex;
    justify-content: center;
    margin-right: -1rem;
  }
  /* Alternate the card around the central axis (legacy sm:flex-row-reverse). */
  .timeline-item--reverse {
    flex-direction: row-reverse;
  }
}

/* ── Calculator — reference 3-step wizard ───────────────────────────────── */
.calc-panel {
  max-width: 56rem;
  margin-inline: auto;
  background: var(--section-card-bg, var(--color-surface));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  backdrop-filter: blur(22px);
  box-shadow: 0 30px 80px rgba(3, 7, 18, 0.2);
  padding: var(--space-m);
}
html[data-theme="light"] .calc-panel {
  box-shadow: 0 25px 90px rgba(15, 23, 42, 0.12);
}
@media (min-width: 768px) {
  .calc-panel {
    padding: var(--space-xl);
  }
}
.calc-progress {
  margin-bottom: var(--space-l);
}
.calc-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2xs);
}
.progress-track {
  width: 100%;
  background: var(--section-progress-bg);
  border-radius: var(--radius-round);
  height: 0.75rem;
  overflow: hidden;
}
.progress-thumb {
  height: 100%;
  width: 33.34%;
  border-radius: var(--radius-round);
  background: linear-gradient(120deg, var(--color-primary-strong), var(--color-primary));
  transition: width 0.2s ease;
}
.calc-step {
  border: 0;
  padding: 0;
  margin: 0 0 var(--space-m);
  min-width: 0;
}
.calc-step legend {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  padding: 0;
  margin-bottom: var(--space-s);
}
.calc-step[hidden] {
  display: none;
}
.calc-type-grid {
  display: grid;
  gap: var(--space-s);
}
@media (min-width: 640px) {
  .calc-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .calc-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.calc-type-grid .option-card {
  width: 100%;
  text-align: left;
}
.option-card {
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius-s);
  padding: 1.25rem;
  background: var(--color-field-bg);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition:
    border 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.option-card:hover {
  transform: translateY(-1px);
}
.option-card.active,
.option-card:has(input:checked) {
  border-color: var(--color-primary);
  box-shadow: 0 18px 45px color-mix(in srgb, var(--color-primary) 35%, transparent);
}
.option-card .option-title {
  display: block;
  font-weight: 600;
  font-size: var(--font-size-l);
}
.option-card .option-note {
  display: block;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}
.calc-options-grid {
  display: grid;
  gap: var(--space-s);
}
.calc-options-grid .option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
}
.calc-options-grid .option-card input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}
.calc-area-label {
  display: block;
  margin-top: var(--space-s);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
}
.calc-area-value {
  font-weight: 600;
  color: var(--color-text);
}
input[type="range"] {
  accent-color: var(--color-primary);
  width: 100%;
}
.calc-estimate {
  margin: var(--space-s) 0;
  padding: var(--space-m);
  border-radius: var(--radius-m);
  text-align: left;
  box-shadow: none;
  margin-top: var(--space-s);
}
.calc-estimate-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}
.calc-output {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--color-primary);
  margin: var(--space-2xs) 0 0;
}
.calc-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  margin-top: var(--space-m);
}
.calc-consent {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: var(--space-s);
}

/* ── FAQ — reference centered accordion ─────────────────────────────────── */
.faq {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  max-width: 56rem;
  margin-inline: auto;
}
.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-m);
  background: var(--color-glass);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  padding: 0;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-s) var(--space-m);
  font-family: var(--font-heading);
  font-size: var(--font-size-l);
  transition: background 0.2s ease;
}
.faq-item summary:hover {
  background: color-mix(in srgb, currentColor 5%, transparent);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary .faq-chevron {
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}
.faq-item[open] summary .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 var(--space-m) var(--space-s);
  color: var(--color-text-muted);
  font-size: var(--font-size-l);
}
/* Open/close animation: native details-content interpolation (Chromium 131+);
   elsewhere the toggle stays instant — no JS fallback needed. */
.faq-item {
  interpolate-size: allow-keywords;
}
.faq-item::details-content {
  opacity: 0;
  block-size: 0;
  overflow-y: clip;
  transition:
    content-visibility 0.25s allow-discrete,
    opacity 0.25s,
    block-size 0.25s ease;
}
.faq-item[open]::details-content {
  opacity: 1;
  block-size: auto;
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}
.form-label {
  font-weight: 600;
}
.form-input,
textarea.form-input,
select.form-input {
  width: 100%;
  background: var(--color-field-bg);
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius-s);
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--color-text);
  transition:
    border 0.2s ease,
    box-shadow 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 35%, transparent);
}
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
}
.form-help {
  color: var(--color-text-muted);
  font-size: var(--font-size-s);
  margin: 0;
}
.form-required {
  color: var(--color-primary);
}
.form-error {
  color: var(--color-primary);
  font-size: var(--font-size-s);
  margin: 0;
}
.form-status {
  color: var(--color-success);
  font-weight: 600;
}
.form-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}
.form-consent {
  color: var(--color-text-muted);
  font-size: var(--font-size-s);
}
.form-consent a {
  color: var(--color-primary);
  text-decoration: underline;
}
.form-grid {
  display: grid;
  gap: var(--space-m);
}
@media (min-width: 768px) {
  .form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Contacts: the lead form renders as a glass card (reference left column). */
.block-form form.block-form > .container,
form.block-form .container {
  background: var(--color-glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-l);
  padding: var(--space-l);
  box-shadow: var(--shadow-card);
}

/* ── Home layout: two-column contacts band (form | contacts+map) ────────── */
/* Same box as .container (content_width + inline padding) so the band's
   cards and every nested container align with the page grid. The hero
   breaks out of this box to full-bleed (see .hero). */
.layout-home {
  max-width: calc(var(--layout-container-width, 1200) * 1px + var(--space-m) * 2);
  margin-inline: auto;
}
@media (min-width: 1024px) {
  .layout-home {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .layout-home > * {
    grid-column: 1 / -1;
  }
  .layout-home > .block-form {
    grid-column: 1;
    align-self: start;
  }
  .layout-home > .block-map {
    grid-column: 2;
  }
}
/* Contacts card lives inside the map block (right column, above the map). */
.contacts-card {
  background: var(--color-glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-l);
  padding: var(--space-m);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
}
.contacts-card h3 {
  font-size: 1.5rem;
  margin: 0 0 var(--space-s);
}
.contacts-card dl {
  display: grid;
  gap: var(--space-s);
  margin: 0;
}
.contacts-card dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
}
.contacts-card dd {
  margin: 0;
  font-size: var(--font-size-l);
  font-weight: 600;
}
.contacts-card dd a {
  color: var(--color-primary);
}

/* Brand-colored selection inside native dropdowns (blue otherwise comes
   from the OS). Chromium honours option background once it is set. */
select.form-input option,
.form-input option {
  background: var(--color-bg-strong);
  color: var(--color-text);
}
select.form-input option:checked,
select.form-input option:hover,
select.form-input option:focus {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

/* ── Block scaffolding (typed blocks render into these) ────────────────── */
.block {
  padding-block: var(--space-m);
}
.block-heading {
  padding-block: var(--space-2xs);
  position: relative;
}
.block-text {
  padding-block: var(--space-2xs);
}
.block > :first-child {
  margin-top: 0;
}
.block > :last-child {
  margin-bottom: 0;
}
.block-list,
.block-related,
.block-timeline,
.block-calculator,
.block-faq,
.block-form-section {
  padding-block: var(--space-l);
}
.page-hero-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-m);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-m);
}
.visually-hidden-title,
.visually-hidden-list {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.block-heading h2 {
  font-size: clamp(2.25rem, 4.5vw, 3rem);
}
.block-heading .heading-eyebrow {
  display: inline-flex;
  padding: 0.35rem 1.25rem;
  border-radius: var(--radius-round);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  font-weight: 600;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
  margin-bottom: var(--space-xs);
}
.block-text {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}
.block-text a {
  color: var(--color-primary);
  text-decoration: underline;
}
.block-image {
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.block-image figcaption {
  padding: var(--space-xs) var(--space-s);
  color: var(--color-text-muted);
  font-size: var(--font-size-s);
}
.block-image--wide,
.block-image--full-bleed {
  border-radius: var(--radius-l);
}
.block-quote {
  border-left: 3px solid var(--color-primary);
  padding: var(--space-s) var(--space-m);
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  font-size: var(--font-size-l);
}
.block-quote footer {
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}
.block-callout {
  border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
  border-radius: var(--radius-m);
  padding: var(--space-m);
}
.block-callout--warning {
  border-color: var(--color-warning);
  background: color-mix(in srgb, var(--color-warning) 10%, transparent);
}
.block-callout--success {
  border-color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 10%, transparent);
}
.block-callout__title {
  margin: 0 0 var(--space-2xs);
  font-size: var(--font-size-l);
}
.block-callout p {
  margin: 0;
  color: var(--color-text-muted);
}
.block-table {
  overflow-x: auto;
}
.block-table table {
  width: 100%;
  border-collapse: collapse;
}
.block-table th,
.block-table td {
  text-align: left;
  padding: var(--space-xs) var(--space-s);
  border-bottom: 1px solid var(--color-border);
}
.block-table th {
  font-family: var(--font-heading);
  color: var(--color-primary);
}
.block-code pre {
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: var(--space-m);
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}
.block-gallery {
  display: grid;
  gap: var(--space-xs);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) {
  .block-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.block-gallery img {
  border-radius: var(--radius-s);
  border: 1px solid var(--color-border);
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.block-video .video-facade {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}
.block-map .map-shell {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-m);
  border: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--color-text-muted);
}
.block-map .map-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-m);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.block-map .map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.block-map .contacts-card + .map-frame,
.block-map .contacts-card + .map-shell {
  margin-top: var(--space-m);
}
.block-map .map-marker {
  position: relative;
  text-align: center;
}
.block-map .map-marker .icon {
  width: 2rem;
  height: 2rem;
  color: var(--color-primary);
}
.block-documents ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-xs);
}
.block-documents li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-s);
  align-items: center;
  padding: var(--space-xs) var(--space-s);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  background: var(--color-surface);
}
.block-documents a {
  color: var(--color-primary);
  font-weight: 600;
}
.block-documents p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-s);
}
.block-related .card-grid {
  margin-top: var(--space-m);
}
.block-cta {
  border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
  background:
    radial-gradient(
      circle at 85% 20%,
      color-mix(in srgb, var(--color-primary) 18%, transparent),
      transparent 55%
    ),
    var(--color-surface);
  border-radius: var(--radius-l);
  padding: var(--space-m);
}
/* Reference CTA: two text lines on the left, action button on the right.
   Compact: the whole band is capped to the reading column, centered. */
.block-cta {
  max-width: calc(56rem + var(--space-m) * 4);
  margin-inline: auto;
}
.block-cta .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  max-width: none;
  padding-inline: 0;
}
.block-cta h2 {
  margin: 0 0 var(--space-2xs);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}
.block-cta p {
  margin: 0;
  color: var(--color-text-muted);
}
.block-cta--wide,
.block-cta--accent {
  display: block;
  text-align: center;
}
.block-cta--accent {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary-soft));
  color: var(--color-primary-contrast);
}
.block-cta--accent p {
  color: color-mix(in srgb, var(--color-primary-contrast) 85%, transparent);
}
.block-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
}
.block-form {
  max-width: none;
}
/* Inline lead form on content pages: match the reading column (like .faq);
   on home the block sits in a narrower grid cell, which still governs. */
.block-form > .container {
  max-width: calc(56rem + var(--space-m) * 2);
  margin-inline: auto;
}
/* Two roughly-square photos in a row inside article/case flow. */
.photo-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-m);
  margin: var(--space-l) auto;
  max-width: 56rem;
}
.photo-row img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-m);
  border: 1px solid var(--color-border);
}
@media (max-width: 767px) {
  .photo-row {
    grid-template-columns: 1fr;
  }
}
.article-source {
  max-width: 56rem;
  margin: var(--space-m) auto 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}
.article-source a {
  text-decoration: underline;
}
/* Lead-capture band on case/article pages reuses .block-cta styling;
   keep its text column from stretching. */
.lead-capture p {
  margin: 0;
  max-width: 46rem;
  color: var(--color-text-muted);
}
.block-quiz {
  max-width: 40rem;
}
.block-related .card {
  display: flex;
  flex-direction: column;
}
.block-related .card h3 {
  font-size: var(--font-size-l);
}

/* ── Footer: reference big glass card ───────────────────────────────────── */
.site-footer {
  margin-top: var(--space-l);
  padding-bottom: var(--space-m);
}
.footer-card {
  background: var(--color-glass);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-m);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  padding: var(--space-l);
}
.footer-grid {
  display: grid;
  gap: var(--space-l);
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.footer-logo-row {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}
.footer-logo {
  height: 3rem;
  width: auto;
  border-radius: var(--radius-s);
}
.footer-name {
  font-family: var(--font-heading);
  font-size: var(--font-size-l);
}
.footer-slogan {
  font-family: var(--font-heading);
  font-size: var(--font-size-s);
  color: var(--color-text-muted);
}
.footer-tagline {
  color: var(--color-text-muted);
  margin: 0;
  max-width: 24rem;
  font-size: var(--font-size-s);
}
.footer-socials {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}
.social-link {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-round);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-text) 15%, transparent);
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}
.social-link:hover {
  color: var(--color-primary);
  transform: translateY(-1px);
}
.footer-heading {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-xs);
  font-weight: 600;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  font-size: var(--font-size-s);
  font-weight: 600;
}
.footer-col .group {
  color: var(--color-text-muted);
}
.footer-col .group ul {
  padding-left: var(--space-s);
  font-weight: 400;
}
.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  font-size: var(--font-size-s);
}
.footer-contacts .footer-phone {
  font-size: var(--font-size-l);
  font-weight: 600;
}
.footer-contacts .muted {
  color: var(--color-text-muted);
}
.footer-bottom {
  margin-top: var(--space-l);
  padding-top: var(--space-s);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-muted);
  font-size: var(--font-size-s);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  justify-content: space-between;
}

/* ── To top / lightbox / breadcrumbs / search ──────────────────────────── */
.to-top {
  position: fixed;
  bottom: var(--space-m);
  right: var(--space-m);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-round);
  border: 1px solid color-mix(in srgb, var(--color-primary) 45%, transparent);
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
  color: var(--color-primary-contrast);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--color-primary) 30%, transparent);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: var(--z-header);
}
.to-top.show {
  opacity: 1;
  pointer-events: auto;
}
.to-top .icon {
  width: 1.1rem;
  height: 1.1rem;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-s);
  background: rgba(2, 6, 23, 0.9);
}
.lightbox[data-open="true"] {
  display: flex;
}
.lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 82vh;
  border-radius: var(--radius-s);
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  padding: 0;
  margin: 0 0 var(--space-s);
  color: var(--color-text-muted);
  font-size: var(--font-size-s);
}
.breadcrumbs li + li::before {
  content: "/";
  margin-right: var(--space-2xs);
  color: var(--color-border);
}
.search__form {
  display: flex;
  gap: var(--space-xs);
  max-width: 34rem;
}
.search__form input[type="search"] {
  flex: 1;
  background: var(--color-field-bg);
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius-s);
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--color-text);
}
.search__results {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-m);
}
.search-hit {
  font-weight: 700;
  color: var(--color-primary);
}

/* ── Error page ─────────────────────────────────────────────────────────── */
.error-page {
  text-align: center;
  padding-block: var(--space-xl);
}
.error-page h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--color-primary);
}

/* ── Prose (rich text bodies) ───────────────────────────────────────────── */
.prose {
  line-height: 1.7;
  font-size: 1.05rem;
}
.prose h2,
.prose h3 {
  margin-top: var(--space-l);
  margin-bottom: var(--space-xs);
}
.prose p {
  margin-bottom: var(--space-s);
  color: var(--color-text-muted);
}
.prose ul,
.prose ol {
  margin-left: 1.25rem;
  margin-bottom: var(--space-s);
  color: var(--color-text-muted);
}
.prose a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ── Lead-request modal (reference ServiceModal) ────────────────────────── */
.service-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-s);
}
.service-modal[data-open="true"] {
  display: flex;
}
.service-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(6px);
  cursor: pointer;
}
.service-modal__panel {
  position: relative;
  width: min(34rem, 100%);
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) transparent;
  background: var(--section-card-bg, var(--color-surface));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  backdrop-filter: blur(22px);
  box-shadow: 0 40px 90px rgba(3, 7, 18, 0.45);
  padding: var(--space-l);
}
.service-modal__panel::-webkit-scrollbar {
  width: 6px;
}
.service-modal__panel::-webkit-scrollbar-track {
  background: transparent;
}
.service-modal__panel::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: var(--radius-round);
}
.service-modal__close {
  position: absolute;
  top: var(--space-s);
  right: var(--space-s);
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-round);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}
.service-modal__close:hover {
  color: var(--color-text);
  transform: rotate(90deg);
}
.service-modal__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: var(--space-s) 0 0;
}
.service-modal__subtitle {
  color: var(--color-text-muted);
  margin: var(--space-2xs) 0 var(--space-s);
}
.service-modal__form .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-s);
}
.service-modal__form .form-field--email,
.service-modal__form .form-field--textarea,
.service-modal__form .form-field--consent {
  grid-column: 1 / -1;
}
/* Reference modal: placeholders instead of visible labels (labels stay for
   screen readers). */
.service-modal__form .form-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.service-modal__consent {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: var(--space-s) 0 0;
}
.service-modal__consent a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 520px) {
  .service-modal__form .form-grid {
    grid-template-columns: 1fr;
  }
}
.service-modal__submit {
  width: 100%;
  margin-top: var(--space-m);
}

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