/* ==========================================================================
   NETRONIK — 2026 redesign
   Design tokens, light + dark, no external dependencies.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Brand */
  --brand-500: #1d86ff;
  --brand-600: #0d6fe0;
  --brand-400: #4fa3ff;
  --accent-500: #ff8a1f;
  --accent-600: #f37200;

  /* Мессенджеры */
  --tg-500: #229ed9;
  --max-500: #6d4aff;
  --max-600: #5a37e8;

  /* Плоские фолбэки для color-mix(): Safari до 16.2 отбрасывает такие
     объявления целиком, поэтому каждое из них дублируется этими токенами. */
  --brand-tint: #e7f1ff;
  --brand-border: #a8ccff;
  --max-tint: #efeaff;
  --max-border: #c3b3ff;

  /* Light surface scale */
  --bg: #f6f8fc;
  --bg-soft: #eef2f9;
  --surface: #ffffff;
  --surface-2: #f9fbfe;
  --line: #e3e8f0;
  --line-strong: #d3dae5;

  /* Text */
  --text: #10182b;
  --text-2: #46536b;
  --text-3: #76839b;
  --on-brand: #ffffff;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(16, 24, 43, .06), 0 2px 6px rgba(16, 24, 43, .04);
  --shadow-md: 0 4px 12px rgba(16, 24, 43, .07), 0 12px 28px rgba(16, 24, 43, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 43, .10), 0 28px 64px rgba(16, 24, 43, .08);
  --ring: 0 0 0 3px rgba(29, 134, 255, .35);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Fluid type scale */
  --fs-display: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
  --fs-h2: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  --fs-h3: clamp(1.06rem, 1rem + .35vw, 1.25rem);
  --fs-lead: clamp(1.02rem, .97rem + .35vw, 1.2rem);
  --fs-sm: .9rem;
  --fs-xs: .8rem;

  --container: 1160px;
  --header-h: 72px;

  --font: "Segoe UI", system-ui, -apple-system, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1c;
    --bg-soft: #0e1526;
    --surface: #131b2e;
    --surface-2: #182238;
    --line: #24304a;
    --line-strong: #33415e;

    --text: #eef2fa;
    --text-2: #aab6cc;
    --text-3: #7d8aa3;

    --brand-500: #4d9dff;
    --brand-600: #6fb0ff;
    --accent-500: #ffa049;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, .45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);

    --brand-tint: #16233a;
    --brand-border: #2f4a72;
    --max-tint: #1e1a35;
    --max-border: #3d3268;
  }
}

/* Explicit toggle must beat the media query in both directions */
:root[data-theme="dark"] {
  --bg: #0a0f1c;
  --bg-soft: #0e1526;
  --surface: #131b2e;
  --surface-2: #182238;
  --line: #24304a;
  --line-strong: #33415e;

  --text: #eef2fa;
  --text-2: #aab6cc;
  --text-3: #7d8aa3;

  --brand-500: #4d9dff;
  --brand-600: #6fb0ff;
  --accent-500: #ffa049;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);

  --brand-tint: #16233a;
  --brand-border: #2f4a72;
  --max-tint: #1e1a35;
  --max-border: #3d3268;
}

/* ============================ Base ============================ */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--brand-500); text-decoration: none; }
a:hover { color: var(--brand-600); }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0; }

:where(a, button, summary, input, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 28px);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--brand-500);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ============================ Header ============================ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
}

.brand { flex: none; display: flex; align-items: center; }
.brand img { height: 40px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 26px);
  margin-inline-start: auto;
}
.nav a {
  position: relative;
  color: var(--text-2);
  font-weight: 600;
  font-size: .95rem;
  padding: 6px 0;
  white-space: nowrap;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-500);
  transform: scaleX(0);
  transition: transform .22s ease;
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--text); }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }

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

/* Weather chip */
.weather {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  font-size: var(--fs-xs);
  color: var(--text-2);
  white-space: nowrap;
}
.weather-icon { font-size: 17px; line-height: 1; }
.weather-temp { font-weight: 800; color: var(--text); font-size: var(--fs-sm); }
.weather-city { color: var(--text-3); }

.theme-toggle,
.burger {
  flex: none;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  font-size: 16px;
  transition: color .2s, border-color .2s, transform .2s;
}
.theme-toggle:hover,
.burger:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }

/* Burger + slide-down panel: only on narrow screens */
.burger { display: none; }
.burger-lines {
  position: relative;
  width: 17px; height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.burger-lines::before,
.burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}
.burger-lines::before { top: -6px; }
.burger-lines::after { top: 6px; }
.burger[aria-expanded="true"] .burger-lines { background: transparent; }
.burger[aria-expanded="true"] .burger-lines::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] .burger-lines::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 0 14px;
  display: grid;
}
.mobile-nav a {
  display: block;
  padding: 13px 4px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.mobile-nav li:last-child a { border-bottom: 0; }
.mobile-nav .mn-weather {
  padding: 12px 4px 0;
  font-size: var(--fs-sm);
  color: var(--text-2);
}

/* ============================ Buttons ============================ */

.btn {
  --btn-bg: var(--brand-500);
  --btn-fg: var(--on-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 700;
  font-size: .96rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn:active { transform: translateY(0); }

.btn-lg { padding: 15px 28px; font-size: 1.02rem; }

.btn-accent { --btn-bg: var(--accent-500); }
.btn-accent:hover { --btn-bg: var(--accent-600); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line-strong);
  box-shadow: none;
}
.btn-ghost:hover { --btn-bg: var(--surface-2); }

.btn-tg { --btn-bg: var(--tg-500); }
.btn-tg:hover { --btn-bg: #1c8abd; }

.btn-max { --btn-bg: var(--max-500); }
.btn-max:hover { --btn-bg: var(--max-600); }

/* Текстовая марка MAX — чтобы не тянуть внешние картинки */
.max-mark {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--max-500);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1;
}

/* Выделенный блок поддержки */
.support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: clamp(20px, 3vw, 34px);
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--r-lg);
  border: 1px solid var(--max-border);
  border: 1px solid color-mix(in srgb, var(--max-500) 35%, var(--line));
  background: var(--max-tint);
  background:
    linear-gradient(120deg,
      color-mix(in srgb, var(--max-500) 10%, transparent),
      color-mix(in srgb, var(--brand-500) 7%, transparent));
  box-shadow: var(--shadow-sm);
}
.support-ic {
  flex: none;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--max-500);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: var(--shadow-md);
}
.support-body { flex: 1; min-width: 240px; }
.support-body h3 { font-size: var(--fs-h3); margin-bottom: 7px; }
.support-body p { color: var(--text-2); font-size: .94rem; }

/* ============================ Sections ============================ */

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-alt { background: var(--bg-soft); }

.section-head {
  max-width: 720px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-500);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.section-head.center .eyebrow::before { display: none; }

.section-title { font-size: var(--fs-h2); }
.section-sub {
  margin-top: 14px;
  font-size: var(--fs-lead);
  color: var(--text-2);
}

/* ============================ Hero ============================ */

.hero {
  position: relative;
  padding: clamp(36px, 5vw, 72px) 0 clamp(48px, 7vw, 88px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 30% 40% -20%;
  background: radial-gradient(45% 45% at 50% 50%, var(--brand-tint), transparent 70%);
  background: radial-gradient(45% 45% at 50% 50%, color-mix(in srgb, var(--brand-500) 22%, transparent), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero-h1 { font-size: var(--fs-display); }
/* Stops stay in the saturated part of the ramp so the tail of the heading
   keeps enough contrast against the light background. */
.hero-h1 .grad {
  background: linear-gradient(96deg, var(--brand-500) 5%, var(--accent-600) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Город обязан быть в H1 для локальной выдачи, но не должен утяжелять строку */
.hero-h1 .city {
  display: block;
  margin-top: .3em;
  font-size: .5em;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text-2);
}

.hero-lead {
  margin-top: 18px;
  font-size: var(--fs-lead);
  color: var(--text-2);
  max-width: 48ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-2);
}
.chip span:first-child { font-size: 14px; }

.hero-media {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}
.hero-media img { width: 100%; }

/* ============================ Cards / services ============================ */

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-border);
  border-color: color-mix(in srgb, var(--brand-500) 40%, var(--line));
}

.card-media {
  background: linear-gradient(160deg, var(--surface-2), var(--bg-soft));
  padding: 22px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}
.card-media img { width: 170px; max-width: 100%; }

.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-title { font-size: var(--fs-h3); }
.card-text { color: var(--text-2); font-size: .94rem; flex: 1; }
.card-price {
  font-weight: 800;
  color: var(--brand-500);
  font-size: 1.05rem;
}
.card-price small { color: var(--text-3); font-weight: 600; font-size: var(--fs-xs); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: .92rem;
  color: var(--brand-500);
}
.card-link .arr { transition: transform .2s ease; }
.card:hover .card-link .arr { transform: translateX(4px); }

/* Feature tiles */
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.feature-ic {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-tint);
  background: color-mix(in srgb, var(--brand-500) 14%, transparent);
  font-size: 22px;
  margin-bottom: 16px;
}
.feature h3 { font-size: var(--fs-h3); margin-bottom: 8px; }
.feature p { color: var(--text-2); font-size: .94rem; }

/* Steps */
.steps { counter-reset: step; }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -18px; left: 24px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: linear-gradient(140deg, var(--brand-500), var(--brand-600));
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-md);
}
.step h3 { font-size: var(--fs-h3); margin: 10px 0 8px; }
.step p { color: var(--text-2); font-size: .94rem; }

/* ============================ Price table ============================ */

.price-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
table.price {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: .95rem;
}
table.price caption {
  text-align: left;
  padding: 18px 22px 0;
  font-weight: 800;
  font-size: var(--fs-h3);
}
table.price th, table.price td {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
table.price thead th {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  font-weight: 800;
}
table.price td:last-child, table.price th:last-child { text-align: right; white-space: nowrap; }
table.price tbody tr:last-child td { border-bottom: 0; }
table.price tbody tr:hover { background: var(--surface-2); }
table.price .amount { font-weight: 800; color: var(--text); }
.price-note { margin-top: 14px; font-size: var(--fs-sm); color: var(--text-3); }

/* ============================ FAQ ============================ */

.faq { display: grid; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 17px 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  margin-inline-start: auto;
  font-size: 22px;
  font-weight: 600;
  color: var(--brand-500);
  transition: transform .25s ease;
  line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 22px 20px; color: var(--text-2); font-size: .95rem; }

/* ============================ Contacts ============================ */

.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(20px, 3vw, 34px);
  align-items: start;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 8px 22px;
}
.info-item {
  display: flex;
  gap: 15px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.info-item:last-child { border-bottom: 0; }
.info-ic {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-tint);
  background: color-mix(in srgb, var(--brand-500) 13%, transparent);
  font-size: 19px;
}
.info-label { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.info-value { font-weight: 700; margin-top: 3px; }
.info-value a { color: var(--text); }
.info-value a:hover { color: var(--brand-500); }

/* Click-to-load map keeps the Yandex payload off first paint */
.map-box {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
}
.map-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  align-content: center;
  cursor: pointer;
  border: 0;
  width: 100%;
  background: var(--surface-2);
  background:
    linear-gradient(color-mix(in srgb, var(--surface) 55%, transparent), color-mix(in srgb, var(--surface) 75%, transparent)),
    var(--surface-2);
  color: var(--text);
  font: inherit;
  text-align: center;
  padding: 20px;
}
.map-placeholder .pin { font-size: 40px; }
.map-placeholder .mp-title { font-weight: 800; }
.map-placeholder .mp-hint { font-size: var(--fs-sm); color: var(--text-2); }

/* Form — свёрнута по умолчанию, раскрывается кнопками «Оставить заявку» */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  margin-top: clamp(20px, 3vw, 34px);
  overflow: hidden;
  scroll-margin-top: calc(var(--header-h) + 16px);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.form-card[open] {
  border-color: var(--brand-border);
  border-color: color-mix(in srgb, var(--brand-500) 45%, var(--line));
  box-shadow: var(--shadow-md);
}

.form-card > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: clamp(18px, 2.5vw, 24px) clamp(18px, 3vw, 28px);
}
.form-card > summary::-webkit-details-marker { display: none; }
.form-card > summary::after {
  content: "";
  margin-inline-start: auto;
  flex: none;
  width: 11px; height: 11px;
  border-right: 2.5px solid var(--brand-500);
  border-bottom: 2.5px solid var(--brand-500);
  transform: rotate(45deg);
  transition: transform .25s ease;
}
.form-card[open] > summary::after { transform: rotate(-135deg); }
.form-card > summary:hover .fc-title { color: var(--brand-500); }

.fc-ic {
  flex: none;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-tint);
  background: color-mix(in srgb, var(--brand-500) 14%, transparent);
  font-size: 21px;
}
.fc-head { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fc-title { font-size: var(--fs-h3); font-weight: 800; transition: color .2s ease; }
.fc-sub { font-size: .92rem; color: var(--text-2); }

.form-card-body {
  padding: 0 clamp(18px, 3vw, 28px) clamp(20px, 3vw, 28px);
  border-top: 1px solid var(--line);
  padding-top: clamp(18px, 2.5vw, 24px);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); }
.field input, .field textarea, .field select {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}
.form-hint { font-size: var(--fs-xs); color: var(--text-3); flex: 1; min-width: 200px; }

/* ============================ Footer ============================ */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: clamp(36px, 5vw, 56px) 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
}
.footer img { height: 38px; width: auto; margin-bottom: 14px; }
.footer p, .footer li { color: var(--text-2); font-size: .93rem; }
.footer h4 { font-size: .95rem; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--brand-500); }
.footer-bottom {
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-3);
}

/* ============================ Mobile action bar ============================ */

.actionbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: none;
  gap: 8px;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.actionbar .btn { flex: 1; padding: 12px 8px; font-size: .88rem; gap: 6px; min-width: 0; }
.actionbar .ab-label { overflow: hidden; text-overflow: ellipsis; }

/* На очень узких экранах оставляем только иконки, чтобы 4 кнопки не ломались */
@media (max-width: 400px) {
  .actionbar .btn { font-size: .8rem; padding: 12px 4px; }
  .actionbar .btn-tg .ab-label,
  .actionbar .btn:first-child .ab-label { display: none; }
}

/* ============================ Reveal animation ============================ */

/* Only hide content when JS is actually running (html.js is set by an inline
   script in <head>). Without this gate a JS failure would leave the whole page
   blank instead of merely un-animated. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ============================ Responsive ============================ */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .weather { display: none; }
}

@media (max-width: 820px) {
  .grid-3 { grid-template-columns: 1fr; }
  .nav { display: none; }
  .header-actions { margin-inline-start: auto; }
  .header-actions .btn-phone { display: none; }
  .burger { display: grid; place-items: center; }
  body { padding-bottom: 68px; }
  .actionbar { display: flex; }
  .card { flex-direction: row; }
  .card-media { border-bottom: 0; border-right: 1px solid var(--line); padding: 16px; flex: none; width: 132px; }
  .card-media img { width: 100px; }
}

@media (max-width: 620px) {
  /* Горизонтальный скролл прятал бы самое важное — цену. Поэтому на узких
     экранах таблица превращается в список «работа — цена». */
  .price-wrap { overflow-x: visible; }
  table.price { min-width: 0; }
  table.price thead { display: none; }
  table.price caption { padding: 18px 18px 6px; }
  table.price tbody, table.price tr, table.price td { display: block; }
  table.price tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 14px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
  }
  table.price tbody tr:last-child { border-bottom: 0; }
  table.price td { padding: 0; border: 0; }
  table.price td:first-child { flex: 1 1 60%; color: var(--text-2); }
  table.price td:last-child { flex: 0 0 auto; text-align: right; }

  .form-grid { grid-template-columns: 1fr; }
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .card { flex-direction: column; }
  .card-media { border-right: 0; border-bottom: 1px solid var(--line); width: auto; padding: 22px; }
  .card-media img { width: 150px; }
  .hero-cta .btn { width: 100%; }
}

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

@media print {
  .header, .actionbar, .map-box, .theme-toggle { display: none !important; }
}

/* ==========================================================================
   Внутренние страницы услуг (добавлено 2026-07-31)
   Отдельные посадочные страницы под каждый ключевой запрос: главная больше
   не пытается ранжироваться сразу по всем услугам.
   ========================================================================== */

/* ------------------------------------------------------- хлебные крошки */

.crumbs {
  padding: calc(var(--header-h) + 18px) 0 0;
  font-size: var(--fs-sm);
  color: var(--text-3);
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.crumbs li { display: flex; align-items: center; gap: 6px; }
.crumbs li + li::before {
  content: "/";
  color: var(--text-3);
  opacity: .6;
}
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--brand-500); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--text-3); }

/* --------------------------------------------- шапка внутренней страницы */

.page-head { padding: 26px 0 8px; }
.page-head .eyebrow { margin-bottom: 10px; }
.page-h1 {
  font-size: var(--fs-display);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 16px;
}
.page-lead {
  font-size: var(--fs-lead);
  color: var(--text-2);
  max-width: 68ch;
  margin: 0 0 22px;
}
.page-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }

/* ------------------------------------------- список неисправностей/работ */

.symptoms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.symptoms li {
  position: relative;
  padding-left: 30px;
  color: var(--text-2);
  line-height: 1.5;
}
.symptoms li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  font-size: .72rem;
  color: var(--brand-500);
  background: var(--brand-tint);
  background: color-mix(in srgb, var(--brand-500) 12%, transparent);
}
.symptoms li b { color: var(--text); font-weight: 600; }

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

/* ------------------------------------------------------ текстовые блоки */

.prose { max-width: 72ch; color: var(--text-2); }
.prose h2 { font-size: var(--fs-h2); color: var(--text); margin: 36px 0 14px; letter-spacing: -.01em; }
.prose h3 { font-size: var(--fs-h3); color: var(--text); margin: 26px 0 10px; }
.prose p { margin: 0 0 14px; line-height: 1.65; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; line-height: 1.65; }
.prose li { margin-bottom: 7px; }
.prose a { color: var(--brand-500); }
.prose strong { color: var(--text); }
.prose > :first-child { margin-top: 0; }

/* ------------------------------------------------------ смежные услуги */

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.related-card {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.related-card:hover {
  border-color: var(--brand-border);
  border-color: color-mix(in srgb, var(--brand-500) 45%, var(--line));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.related-card strong { display: block; color: var(--text); margin-bottom: 4px; }
.related-card span { color: var(--text-3); font-size: var(--fs-sm); }

/* ------------------------------------------------------------ CTA-полоса */

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 26px 28px;
  border: 1px solid var(--brand-border);
  border: 1px solid color-mix(in srgb, var(--brand-500) 32%, var(--line));
  border-radius: var(--r-lg);
  background: var(--brand-tint);
  background: color-mix(in srgb, var(--brand-500) 7%, var(--surface));
}
.cta-band-body { flex: 1 1 300px; }
.cta-band h2 { font-size: var(--fs-h3); margin: 0 0 6px; }
.cta-band p { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.cta-band .btn { flex: 0 0 auto; }

@media (max-width: 560px) {
  .cta-band { padding: 22px 18px; }
  .cta-band .btn { width: 100%; }
}

/* Заголовок карточки услуги стал ссылкой на посадочную страницу */
.card-title a {
  color: inherit;
  text-decoration: none;
}
.card-title a:hover { color: var(--brand-500); }
.card-text a { color: var(--brand-500); text-decoration: none; }
.card-text a:hover { text-decoration: underline; }

/* Блок «Все услуги» под карточками на главной */
.services-all { margin-top: 34px; }
.services-all h3 {
  font-size: var(--fs-h3);
  margin: 0 0 16px;
  text-align: center;
  color: var(--text);
}

/* ------------------------------------------------- фото входа в контактах */

.entrance {
  margin: 26px 0 0;
  max-width: 860px;
}
.entrance picture,
.entrance img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.entrance figcaption {
  margin-top: 12px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: 1.55;
  max-width: 62ch;
}
.entrance figcaption strong { color: var(--text); }

/* -------------------------------------------- оценка на Яндекс.Картах */

.rating-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 26px;
  margin-top: 34px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.rating-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  line-height: 1;
}
.rs-num {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
}
.rs-stars {
  margin-top: 6px;
  font-size: 1rem;
  letter-spacing: 2px;
  color: #f5a623;
}
/* половина звезды: приглушаем последнюю, чтобы 4,4 не выглядело как 5 */
.rs-half { opacity: .42; }

.rating-body { flex: 1 1 320px; }
.rating-body h3 {
  font-size: var(--fs-h3);
  margin: 0 0 6px;
  color: var(--text);
}
.rating-body p {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: 1.55;
  max-width: 62ch;
}
.rating-band .btn { flex: 0 0 auto; }

@media (max-width: 560px) {
  .rating-band { padding: 20px 18px; }
  .rating-band .btn { width: 100%; }
}
