/* ============================================================
   ТОННАР — завод ваг · спільна дизайн-система
   Палітра та правила — за ТЗ §2 «Дизайн».
   Mobile-first, брейкпоінти: 640 / 900 / 1200 px.
   ============================================================ */

:root {
  --navy: #071630;
  --navy-2: #0d2247;
  --navy-3: #122c5c;
  --accent: #1857d3;
  --accent-2: #2e7dff;
  --grad: linear-gradient(135deg, #1857d3 0%, #2e7dff 100%);
  --light: #f2f5fa;
  --ink: #0b0f16;
  --muted: rgba(11, 15, 22, 0.62);
  --muted-dark: rgba(255, 255, 255, 0.66);
  --line: rgba(11, 15, 22, 0.09);
  --line-dark: rgba(255, 255, 255, 0.12);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(7, 22, 48, 0.10);
  --shadow-lg: 0 24px 60px rgba(7, 22, 48, 0.16);
  --header-h: 72px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* страховка від горизонтального скролу на 360px */
}

img, svg, video, iframe { max-width: 100%; }
iframe { border: 0; }

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

h1 { font-size: clamp(1.9rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

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

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; }

section[id], div[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

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

@media (min-width: 640px) { .container { padding: 0 28px; } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 0;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 12px 28px rgba(24, 87, 211, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(24, 87, 211, 0.45); text-decoration: none; filter: brightness(1.05); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
  color: #fff;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); box-shadow: none; }

.btn--light {
  background: #fff;
  color: var(--navy);
  box-shadow: var(--shadow);
}
.btn--light:hover { box-shadow: var(--shadow-lg); }

.btn--small { padding: 10px 18px; font-size: 0.92rem; border-radius: 12px; }

/* ---------- Шапка (fixed; на сторінках без hero додати .site-header--solid) ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  color: #fff;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled,
.site-header--solid {
  background: rgba(7, 22, 48, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(2, 8, 20, 0.45);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  box-shadow: 0 8px 20px rgba(24, 87, 211, 0.45);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-size: 1.08rem; font-weight: 800; letter-spacing: 0.06em; }
.logo-text small { font-size: 0.72rem; color: var(--muted-dark); letter-spacing: 0.02em; }
.logo-img { height: 44px; width: auto; display: block; }
.footer-logo .logo-img { height: 52px; }

.nav {
  display: none; /* мобільна версія — панель під бургером */
}

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

.header-phone {
  display: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}
.header-phone:hover { color: var(--accent-2); text-decoration: none; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  overflow: hidden;
}
.lang-switch button {
  background: transparent;
  border: 0;
  color: var(--muted-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang-switch button.active { background: var(--grad); color: #fff; }

.burger {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  gap: 0;
  padding: 10px;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger span + span { margin-top: 5px; }
body.nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Мобільна навігація */
@media (max-width: 1023.98px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    background: rgba(7, 22, 48, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 10px 20px 26px;
    border-bottom: 1px solid var(--line-dark);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  body.nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav a {
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 13px 4px;
    border-bottom: 1px solid var(--line-dark);
  }
  .nav a:last-child { border-bottom: 0; }
  .nav a:hover { color: var(--accent-2); text-decoration: none; }
}

@media (min-width: 640px) {
  .header-phone { display: inline-block; }
}

@media (min-width: 1024px) {
  .burger { display: none; }
  .nav { display: flex; gap: 4px; margin-left: 8px; }
  .nav a {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 8px 11px;
    border-radius: 10px;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
  }
  .nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.09); text-decoration: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: #fff;
  background: var(--navy) url("../img/tonnar-hero.jpg") center / cover no-repeat;
  isolation: isolate;
  padding: calc(var(--header-h) + 48px) 0 72px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 22, 48, 0.72) 0%, rgba(7, 22, 48, 0.55) 45%, rgba(7, 22, 48, 0.92) 100%),
    radial-gradient(80% 60% at 70% 20%, rgba(46, 125, 255, 0.22), transparent 60%);
}

.hero-inner { max-width: 860px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
  flex-shrink: 0;
}

.hero h1 { margin-bottom: 0.4em; }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted-dark);
  max-width: 620px;
  margin-bottom: 32px;
}

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

/* ---------- Секції ---------- */
.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 104px 0; } }

.section--dark { background: var(--navy); color: #fff; }
.section--dark .section-sub { color: var(--muted-dark); }
.section--light { background: var(--light); }

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-sub { color: var(--muted); font-size: 1.05rem; margin-bottom: 0; }

/* ---------- Лічильники ---------- */
.counters {
  background: var(--navy);
  color: #fff;
  padding: 40px 0;
  border-top: 1px solid var(--line-dark);
}
.counters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px 16px;
}
.counter { text-align: center; }
.counter-value {
  display: block;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  background: linear-gradient(135deg, #6ea2ff, #2e7dff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.counter-label { color: var(--muted-dark); font-size: 0.9rem; margin: 6px 0 0; }

@media (min-width: 900px) {
  .counters-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Marquee переваг ---------- */
.marquee {
  background: var(--grad);
  color: #fff;
  overflow: hidden;
  padding: 14px 0;
  position: relative;
}
.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 32s linear infinite;
  will-change: transform;
}
.marquee-track span {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 48px;
}
.marquee-track span::after { content: "◆"; font-size: 0.6rem; opacity: 0.65; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- Картки продукції ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); text-decoration: none; }

.card-ph {
  aspect-ratio: 16 / 9.5;
  background: linear-gradient(150deg, var(--navy-2), var(--navy) 65%);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.card-ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 80% 15%, rgba(46, 125, 255, 0.3), transparent 65%);
}
.card-ph svg { width: 64px; height: 64px; opacity: 0.9; position: relative; z-index: 1; }
.card-ph--img { background: none; }
.card-ph--img::after { display: none; }
.card-ph--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph--img { background: none; }
.ph--img::after { display: none; }
.ph--img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 6px; }
.card-spec { color: var(--muted); font-size: 0.92rem; margin-bottom: 14px; }
.card-price {
  margin-top: auto;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--accent);
}
.card-link {
  margin-top: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.card-link::after { content: "→"; transition: transform 0.2s ease; }
.card:hover .card-link::after { transform: translateX(4px); }

/* ---------- Загальний плейсхолдер фото (TODO: фото від замовника) ---------- */
.ph {
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--navy-2), var(--navy) 65%);
  display: grid;
  place-items: center;
  min-height: 240px;
  position: relative;
  overflow: hidden;
}
.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 80% 15%, rgba(46, 125, 255, 0.3), transparent 65%);
}
.ph svg { width: 84px; height: 84px; opacity: 0.9; position: relative; z-index: 1; }

/* ---------- Інструменти: конфігуратор і калькулятори ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}
@media (min-width: 1024px) { .tools-grid { grid-template-columns: 1fr; max-width: 820px; margin-left: auto; margin-right: auto; } }

.tool {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 26px 24px;
  backdrop-filter: blur(6px);
}
.tool h3 { color: #fff; margin-bottom: 18px; }
.tool label { display: block; color: var(--muted-dark); font-size: 0.88rem; font-weight: 600; margin-bottom: 14px; }

.tool select,
.tool input[type="text"],
.tool input[type="tel"],
.tool input[type="email"] {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
}
.tool select option { color: var(--ink); }
.tool select:focus, .tool input:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }

/* Сегментовані кнопки моделей */
.seg {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-dark);
  border-radius: 13px;
  padding: 4px;
  margin-bottom: 16px;
}
.seg button {
  flex: 1;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-dark);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 6px;
  transition: background 0.2s ease, color 0.2s ease;
}
.seg button.active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(24, 87, 211, 0.4); }

/* Чекбокси опцій */
.opts { display: grid; gap: 8px; margin-bottom: 14px; }
.opt {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem !important;
  color: rgba(255, 255, 255, 0.82) !important;
  font-weight: 500 !important;
  margin-bottom: 0 !important;
  cursor: pointer;
}
.opt input[type="checkbox"],
.opt input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-2);
  flex-shrink: 0;
}
.opt-group { display: grid; gap: 8px; }
.opt-group + .opt-group { margin-top: 10px; }
.opt-group__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.55);
}

/* Блок ціни */
.price-block { margin: 18px 0 20px; }
.price-old {
  display: block;
  color: var(--muted-dark);
  text-decoration: line-through;
  font-size: 1rem;
  min-height: 1.4em;
}
.price-new {
  display: block;
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #8db4ff, #2e7dff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.price-note { color: #7ee2a8; font-size: 0.88rem; margin: 8px 0 0; min-height: 1.3em; }
.price-note strong { color: #4ade80; }
.price-disclaimer { color: var(--muted-dark); font-size: 0.78rem; margin: 14px 0 0; }

/* Повзунки */
input[type="range"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
  margin: 14px 0 8px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grad);
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(24, 87, 211, 0.5);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-2);
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(24, 87, 211, 0.5);
  cursor: pointer;
}

.range-value { color: #fff; font-weight: 700; }

.calc-result {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-dark);
}
.calc-row span { color: var(--muted-dark); font-size: 0.85rem; }
.calc-row strong { color: #fff; font-size: 1.12rem; white-space: nowrap; }
.calc-row--accent { border-color: rgba(74, 222, 128, 0.35); background: rgba(34, 197, 94, 0.08); }
.calc-row--accent strong { color: #4ade80; }
.calc-line { color: #7ee2a8; font-weight: 700; font-size: 0.95rem; margin: 14px 0 0; }

/* ---------- Карта об'єктів ---------- */
.map-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: stretch;
}
@media (min-width: 1024px) { .map-wrap { grid-template-columns: 1.9fr 1fr; } }

.map-svg {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
}
.map-svg svg { display: block; width: 100%; height: auto; }

.map-outline { fill: #e9effb; stroke: var(--navy); stroke-width: 2; }

.map-city { fill: var(--navy); stroke: #fff; stroke-width: 2.4; }
.map-city-label {
  font-size: 13px;
  font-weight: 700;
  fill: var(--navy);
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3.5px;
  stroke-linejoin: round;
  pointer-events: none;
}

.map-dot { cursor: pointer; transition: r 0.15s ease; stroke: #fff; stroke-width: 1.1; }
.map-dot:hover { r: 5; }
.map-dot--active { stroke: #fff; stroke-width: 2.4; }

.map-panel {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
}
.map-panel h3 { margin-bottom: 6px; }
.map-total { margin: 0 0 18px; color: var(--muted-dark); font-size: 0.95rem; }
.map-total strong { color: #fff; font-size: 1.5rem; font-weight: 800; margin-right: 6px; }

.map-legend { display: grid; gap: 8px; margin-bottom: 20px; }
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}
.map-legend-item .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.map-legend-item strong { margin-left: auto; font-weight: 800; }

.map-raion-label { font-size: 7px; fill: #64748b; pointer-events: none; }

.map-toggle {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  text-align: left;
  width: 100%;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.map-toggle:hover { opacity: 0.85; }
.map-toggle[aria-pressed="true"] { opacity: 1; }
.map-toggle[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px rgba(142, 163, 192, 0.5); }

.map-info {
  border-top: 1px solid var(--line-dark);
  padding-top: 18px;
  margin-top: auto;
}
.map-info-place { font-size: 1.15rem; font-weight: 800; margin-bottom: 10px; }
.map-info-hint { color: var(--muted-dark); font-size: 0.88rem; margin: 0; }
.map-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.map-tag {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(46, 125, 255, 0.16);
  border: 1px solid rgba(46, 125, 255, 0.4);
  color: #bcd4ff;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------- Чому Тоннар ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  align-items: center;
}
@media (min-width: 1024px) { .why-grid { grid-template-columns: 1fr 1.15fr; gap: 54px; } }

.why-list { display: grid; gap: 18px; }
.why-item { display: flex; gap: 16px; align-items: flex-start; }
.why-check {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--grad);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(24, 87, 211, 0.4);
}
.why-item h3 { font-size: 1.02rem; margin-bottom: 4px; color: #fff; }
.why-item p { color: var(--muted-dark); font-size: 0.92rem; margin: 0; }

/* ---------- Вкладки (tabs) ---------- */
.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}
.tabs-nav button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}
.section--dark .tabs-nav button { background: rgba(255, 255, 255, 0.06); border-color: var(--line-dark); color: var(--muted-dark); }
.tabs-nav button.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(24, 87, 211, 0.35);
}

.tt-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  min-height: 220px;
}
@media (min-width: 640px) { .tt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tt-grid { grid-template-columns: repeat(4, 1fr); } }
/* 6 вікон (сторінка «Кейси та відео»): рівна сітка 3×2 */
@media (min-width: 1024px) { .tt-grid--6 { grid-template-columns: repeat(3, 1fr); } }

.tt-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0a0a0a;
  aspect-ratio: 9 / 16;
}
.tt-item iframe { width: 100%; height: 100%; display: block; }

/* Постер-фасада TikTok: локальне превʼю одразу, живий плеєр — по кліку */
.tt-poster { position: relative; cursor: pointer; }
.tt-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(10, 14, 26, 0.72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}
.tt-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
}
.tt-poster:hover .tt-play,
.tt-poster:focus-visible .tt-play { transform: scale(1.08); background: var(--accent); }
.tt-item.tt-live { cursor: default; }

.tt-fallback {
  grid-column: 1 / -1;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 26px;
  text-align: center;
}
.tt-fallback p { color: var(--muted); }

.tt-channel { margin-top: 26px; text-align: center; }

/* ---------- Кроки «Як ми працюємо» ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  counter-reset: step;
}
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 26px 22px;
  position: relative;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--grad);
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 10px 22px rgba(24, 87, 211, 0.4);
}
.step h3 { color: #fff; font-size: 1.02rem; margin-bottom: 6px; }
.step p { color: var(--muted-dark); font-size: 0.9rem; margin: 0; }

/* ---------- Контакти + форма ---------- */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
@media (min-width: 1024px) { .contacts-grid { grid-template-columns: 1fr 1fr; gap: 54px; } }

.contact-list { display: grid; gap: 18px; margin-top: 24px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-item .ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--accent);
}
.contact-item .ic svg { width: 20px; height: 20px; }
.contact-item strong { display: block; font-size: 0.82rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.contact-item a, .contact-item span.val { color: var(--ink); font-weight: 700; font-size: 0.98rem; }

/* Форма (світла секція) */
.form {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 30px 26px;
}
.form h3 { margin-bottom: 18px; }
.form label { display: block; font-size: 0.86rem; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.form input[type="text"],
.form input[type="tel"],
.form input[type="email"] {
  width: 100%;
  margin-top: 6px;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--light);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.form input:focus { outline: none; border-color: var(--accent-2); background: #fff; }
.form .btn { width: 100%; margin-top: 6px; }
.form-note { text-align: center; color: var(--muted); font-size: 0.82rem; margin: 14px 0 0; }

/* ---------- Таблиці (для каталогу / сторінок моделей) ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
/* Багатоколонкові матриці (сторінка «Продукція») — їм потрібна
   мінімальна ширина, тож на вузьких екранах вони гортатимуться;
   двоколонкові таблиці характеристик на сторінках моделей
   min-width НЕ мають і влазять у будь-який екран. */
.table--matrix { min-width: 620px; }
.table th, .table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.table thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.table tbody tr:nth-child(even) { background: var(--light); }
.table tbody tr:hover { background: #e8f0ff; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* На телефонах — компактніші комірки, щоб вузькі таблиці
   (наприклад, «Модельний ряд: довжина × тоннаж») влазили без гортання.
   Блок має стояти ПІСЛЯ базових правил .table, інакше вони його перебивають. */
@media (max-width: 640px) {
  .table { font-size: 0.85rem; }
  .table th, .table td { padding: 9px 10px; }
  .table thead th { font-size: 0.78rem; }
  /* Таблиця «Модельний ряд»: має влізти в телефон без гортання */
  .table--fit th, .table--fit td { padding: 8px 7px; }
  .table--fit thead th { font-size: 0.72rem; letter-spacing: 0; }
  .table--fit tbody td { font-size: 0.8rem; }
}

/* ---------- Футер ---------- */
.site-footer {
  background: #040d20;
  color: var(--muted-dark);
  padding: 60px 0 30px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  margin-bottom: 44px;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

.site-footer h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer ul { display: grid; gap: 10px; }
.site-footer a { color: var(--muted-dark); }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-contacts li { display: flex; gap: 8px; flex-direction: column; }
.footer-contacts a { color: #fff; font-weight: 600; }
.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 0.82rem;
}
.footer-logo { margin-bottom: 16px; }
.footer-about { max-width: 300px; }

/* ---------- Reveal-анімація ---------- */
.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.rv-visible { opacity: 1; transform: none; }
.rv-d1 { transition-delay: 0.08s; }
.rv-d2 { transition-delay: 0.16s; }
.rv-d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .card, .btn, .card-link::after { transition: none; }
}

/* ============================================================
   ВНУТРІШНІ СТОРІНКИ (сторінки моделей, каталог, статті)
   ============================================================ */

/* ---------- Page-hero: темний блок з хлібними крихтами ---------- */
.page-hero {
  background:
    radial-gradient(70% 90% at 85% 0%, rgba(46, 125, 255, 0.25), transparent 60%),
    linear-gradient(160deg, var(--navy-2), var(--navy) 70%);
  color: #fff;
  padding: calc(var(--header-h) + 52px) 0 56px;
}
.page-hero h1 { margin-bottom: 0.35em; max-width: 840px; }
.page-lead { color: var(--muted-dark); font-size: 1.08rem; max-width: 720px; margin: 0; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  margin-bottom: 22px;
  color: var(--muted-dark);
}
.breadcrumbs a { color: #9db8ea; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs li { display: flex; align-items: center; gap: 10px; }
.breadcrumbs li + li::before { content: "›"; color: rgba(255, 255, 255, 0.35); }
.breadcrumbs [aria-current] { color: #fff; font-weight: 600; }

/* ---------- Двоколонковий блок (текст + фото/картка) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  align-items: start;
}
@media (min-width: 1024px) { .split { grid-template-columns: 1.1fr 1fr; gap: 54px; } }
.split--reverse > :first-child { order: 2; }
.split--reverse > :last-child { order: 1; }
@media (max-width: 1023.98px) {
  .split--reverse > :first-child { order: 1; }
  .split--reverse > :last-child { order: 2; }
}

/* ---------- Ціновий блок на сторінці моделі ---------- */
.price-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 26px;
}
.price-card h2 { font-size: 1.1rem; margin-bottom: 14px; }
.price-big {
  display: block;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--accent);
  margin-bottom: 6px;
}
.price-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.price-card .btn { width: 100%; }

/* ---------- Списки з галочками ---------- */
.check-list { display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 30px; line-height: 1.5; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--grad);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.section--dark .check-list li { color: rgba(255, 255, 255, 0.88); }

/* ---------- Картки-особливості ---------- */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 22px;
}
.section--dark .feature {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-dark);
  box-shadow: none;
}
.feature .ic {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 10px 22px rgba(24, 87, 211, 0.35);
}
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.02rem; margin-bottom: 6px; }
.section--dark .feature h3 { color: #fff; }
.feature p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.section--dark .feature p { color: var(--muted-dark); }

/* ---------- Галерея-плейсхолдери ---------- */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery .ph { min-height: 200px; }

/* ---------- Відгуки ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 1024px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }
.review {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
}
.review blockquote {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.6;
  flex: 1;
}
.review blockquote::before {
  content: "«";
  display: block;
  font-size: 2.6rem;
  line-height: 0.6;
  color: var(--accent-2);
  margin-bottom: 12px;
  font-weight: 800;
}
.review .who { font-weight: 800; font-size: 0.95rem; }
.review .role { color: var(--muted); font-size: 0.84rem; }

/* Видимий TODO-плейсхолдер (матеріали від замовника) */
.todo-note {
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
  color: #92600a;
  padding: 12px 16px;
  border-radius: 0 12px 12px 0;
  font-size: 0.9rem;
  font-style: italic;
}

/* ---------- FAQ (details/summary, без JS) ---------- */
.faq-list { max-width: 860px; }
.faq-item {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--light);
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.faq-item[open] summary::after { content: "–"; background: var(--grad); color: #fff; }
.faq-a { padding: 0 24px 22px; color: var(--muted); }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- Таби-посилання (застосування) ---------- */
.tabs-nav a {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}
.tabs-nav a:hover { text-decoration: none; border-color: var(--accent-2); color: var(--accent); }
.tabs-nav a.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(24, 87, 211, 0.35);
}

/* ---------- Фундамент: схеми ---------- */
.fund-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 1024px) { .fund-grid { grid-template-columns: repeat(3, 1fr); } }
.fund-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
}
.fund-card svg {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: var(--light);
  margin-bottom: 18px;
}
.fund-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 2; /* єдиний кадр: у трьох 3D-рендерів різні пропорції,
                          contain вписує без обрізки, чорне тло зливається з фоном рендерів */
  object-fit: contain;
  display: block;
  border-radius: 12px;
  background: #000;
  margin-bottom: 18px;
}
.fund-card--main {
  outline: 2px solid var(--accent);
  position: relative;
}
.fund-badge {
  position: absolute;
  top: -13px;
  left: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.fund-card h3 { font-size: 1.05rem; }
.fund-card ul { display: grid; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.fund-card ul li { padding-left: 18px; position: relative; }
.fund-card ul li::before { content: "•"; position: absolute; left: 4px; color: var(--accent); }

/* ---------- Вбудована карта (Google) ---------- */
.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--light);
}
.map-embed iframe { width: 100%; height: 420px; display: block; }

/* ---------- Вбудоване відео (YouTube) ---------- */
.video-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
  aspect-ratio: 16 / 9;
}
.video-embed iframe { width: 100%; height: 100%; display: block; border: 0; }
/* Вертикальне відео (YouTube Shorts) — вузький центрований кадр */
.video-embed--short {
  aspect-ratio: 9 / 16;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 26px;
}

/* ---------- Матриця модельного ряду ---------- */
.table .cell-ok { color: #16a34a; font-weight: 700; }
.table .cell-dim { color: var(--muted); }
.table .row-hl { background: #e8f0ff !important; font-weight: 700; }

/* ---------- CTA-смуга ---------- */
.cta-band {
  background:
    radial-gradient(70% 100% at 90% 0%, rgba(46, 125, 255, 0.3), transparent 60%),
    linear-gradient(160deg, var(--navy-2), var(--navy) 75%);
  border-radius: var(--radius);
  color: #fff;
  padding: 40px 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 900px) { .cta-band { grid-template-columns: 1.4fr 1fr; padding: 48px 44px; } }
.cta-band h2 { margin-bottom: 0.3em; }
.cta-band p { color: var(--muted-dark); margin: 0; }
.cta-band .btn { justify-self: start; }
@media (min-width: 900px) { .cta-band .btn { justify-self: end; } }

/* ============ Калькулятор витрат на зважування (wc) ============ */
.tool--wide { margin-top: 22px; }
.tool-sub { color: var(--muted-dark); font-size: 0.88rem; margin: -10px 0 18px; }

.wc-grid { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }
@media (min-width: 1024px) { .wc-grid { grid-template-columns: 1.2fr 1fr; } }

.wc-field { display: block; margin-bottom: 14px; }
.wc-field:last-child { margin-bottom: 0; }
.wc-lbl { display: block; color: var(--muted-dark); font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.wc-hint { display: block; font-size: 0.75rem; color: var(--muted-dark); margin-top: 4px; }

.wc-input {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.wc-input:focus-within { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.wc-input input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #fff;
  padding: 12px 14px;
  font: inherit;
}
.wc-input input:focus { outline: none; }
.wc-unit {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 1px solid var(--line-dark);
  color: var(--muted-dark);
  font-size: 0.82rem;
  white-space: nowrap;
}

.wc-row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.wc-row3 .wc-field { margin-bottom: 0; }

.wc-seg { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.wc-seg button {
  flex: 1 1 150px;
  padding: 10px;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.wc-seg button small { display: block; color: var(--muted-dark); font-size: 0.74rem; margin-top: 2px; }
.wc-seg button.active { border-color: var(--accent-2); background: rgba(46, 125, 255, 0.16); font-weight: 600; }
.wc-seg button.active small { color: #a9c4f5; }

.wc-res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.wc-res {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  padding: 12px 14px;
}
.wc-res .l { display: block; font-size: 0.74rem; color: var(--muted-dark); }
.wc-res .v { display: block; font-size: 1.2rem; font-weight: 800; color: #fff; margin-top: 2px; }
.wc-res--accent { background: rgba(46, 125, 255, 0.16); border-color: rgba(46, 125, 255, 0.45); }
.wc-res--accent .v { color: #8db4ff; }
.wc-results .calc-line { margin-top: 14px; }

.wc-foot { margin-top: 18px; border-top: 1px dashed var(--line-dark); padding-top: 16px; }
.wc-foot > p strong { color: #dfe7f5; font-size: 0.82rem; }
.wc-risks { margin: 10px 0 0 18px; font-size: 0.78rem; color: var(--muted-dark); }
.wc-risks li { margin-bottom: 6px; }
.wc-note { margin-top: 14px; font-size: 0.78rem; color: var(--muted-dark); }

.wc-cta { margin-top: 20px; text-align: center; }
.wc-lead { display: none; margin-top: 18px; text-align: left; }
.wc-lead.open { display: block; }

@media (max-width: 560px) {
  .wc-seg button { flex: 1 1 100%; }
  .wc-res-grid { grid-template-columns: 1fr 1fr; }
}
