/* =========================================================================
   Палитра: тёмно-синий, сталь и голубые чертёжные линии.
   Шрифты: Tektur (заголовки), Golos Text (текст), JetBrains Mono (G-код).
   ========================================================================= */
:root {
  --bg: #0b1524;
  --bg-2: #0f1d30;
  --surface: #13243a;
  --surface-2: #1a304a;
  --line: #294464;
  --line-strong: #3e5f82;
  --blue: #91b3d5;
  --blue-soft: rgba(112, 170, 231, 0.22);
  --blue-faint: rgba(112, 170, 231, 0.08);
  --text: #eaf3ff;
  --muted: #a2b9d1;
  --accent: #8bc5ff;
  --accent-hover: #b4ddff;
  --on-accent: #0b1c31;
  --danger: #ef8a7a;

  --font-display: 'Tektur', 'Golos Text', system-ui, sans-serif;
  --font-body: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 72px;
  --chamfer: 10px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 240ms;

  --z-header: 50;
  --z-menu: 45;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.05; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Кнопки (с фаской) ---------- */
.btn {
  --c: var(--chamfer);
  position: relative;
  isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: 0.01em;
  text-decoration: none; border: 0; background: none;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), transform 120ms var(--ease-out);
  touch-action: manipulation;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:focus-visible { outline: 2px solid var(--bg); outline-offset: -6px; }
.btn-ghost { color: var(--text); }
.btn-ghost::before, .btn-ghost::after {
  content: ''; position: absolute; z-index: -1;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.btn-ghost::before { inset: 0; background: var(--line-strong); transition: background-color var(--dur) var(--ease-out); }
.btn-ghost::after { inset: 1px; background: var(--bg); --c: calc(var(--chamfer) - 0.4px); }
.btn-ghost:hover::before { background: var(--accent); }
.btn-ghost:hover { color: var(--accent-hover); }
.btn-ghost:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: -6px; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; --chamfer: 8px; }

/* ---------- Шапка ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  height: var(--header-h);
  transition: transform 320ms var(--ease-out), background-color 320ms var(--ease-out), border-color 320ms;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(11, 21, 36, 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.header-row { height: 100%; display: flex; align-items: center; gap: 32px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: 0.02em;
  color: var(--on-accent); background: var(--accent);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.brand-role { font-size: 0.8125rem; color: var(--muted); }

.nav { display: flex; gap: 4px; }
.nav a {
  position: relative; padding: 10px 12px; text-decoration: none; font-size: 0.9375rem; color: var(--muted);
  transition: color var(--dur);
}
.nav a::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease-out);
}
.nav a:hover, .nav a[aria-current='true'] { color: var(--text); }
.nav a[aria-current='true']::after { transform: scaleX(1); }

.burger { display: none; width: 48px; height: 48px; border: 1px solid var(--line-strong); background: transparent; position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--text); transition: transform 300ms var(--ease-out); }
.burger span:first-child { top: 19px; }
.burger span:last-child { top: 27px; }
.burger[aria-expanded='true'] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded='true'] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: var(--z-menu);
  background: var(--bg); border-top: 1px solid var(--line);
  padding: 24px var(--gutter);
}
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu a {
  font-family: var(--font-display); font-size: 2rem; font-weight: 600; text-decoration: none;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}

/* ---------- Первый экран ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  padding: calc(var(--header-h) + 24px) 0 48px;
  display: flex; align-items: center;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--blue-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--blue-faint) 1px, transparent 1px),
    linear-gradient(rgba(112, 170, 231, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 170, 231, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse at 78% 24%, #18395e 0%, transparent 65%);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px, 100% 100%;
  background-position: -1px -1px;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 160px; pointer-events: none;
  background: linear-gradient(transparent, var(--bg));
}
/* Рамка листа: слева поле шире, как у чертежа */
.sheet-frame {
  position: absolute; inset: calc(var(--header-h) + 4px) 16px 16px 36px;
  border: 1px solid var(--blue-soft); pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.hero-kicker { color: var(--muted); font-size: 1rem; margin-bottom: 20px; }
.hero-title {
  font-weight: 700;
  font-size: clamp(3.25rem, 5vw, 5.25rem);
  font-variation-settings: 'wdth' 75;
  line-height: 1.01;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  white-space: nowrap;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero-title .line > span { display: inline-block; }
.hero-title .line:last-child { color: var(--accent); }
.hero-lead { max-width: 34em; color: #bfd0e4; font-size: 1.0625rem; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-machine { display: flex; flex-direction: column; gap: 16px; }
.machine-stage {
  position: relative; aspect-ratio: 4 / 3; width: 100%;
  border: 1px solid var(--blue-soft);
  background:
    radial-gradient(ellipse at 50% 55%, rgba(112, 170, 231, 0.16), transparent 65%);
}
.machine-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.machine-stage::before, .machine-stage::after {
  /* метки углов вида */
  content: ''; position: absolute; width: 14px; height: 14px; border-color: var(--blue); border-style: solid; pointer-events: none;
}
.machine-stage::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.machine-stage::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.machine-op {
  position: absolute; top: 14px; left: 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.875rem; color: var(--text);
  background: rgba(11, 21, 36, 0.78); border: 1px solid var(--line); padding: 6px 12px;
}
.op-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(139, 197, 255, 0.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(139, 197, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(139, 197, 255, 0); } }

.dro {
  position: absolute; top: 14px; right: 14px;
  font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.5;
  background: rgba(11, 21, 36, 0.78); border: 1px solid var(--line); padding: 8px 12px;
  min-width: 132px; font-variant-numeric: tabular-nums;
}
.dro div { display: flex; justify-content: space-between; gap: 14px; }
.dro span { color: var(--blue); }
.dro output { color: var(--text); }
.dro .dro-sub { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; font-size: 0.75rem; }
.dro .dro-sub output { color: var(--muted); }

.gcode {
  position: absolute; left: 14px; bottom: 14px;
  width: min(300px, 52%); height: calc(1.6em * 7 + 16px);
  overflow: hidden;
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.6;
  background: rgba(11, 21, 36, 0.82); border: 1px solid var(--line); padding: 8px 0;
}
.gcode li { padding: 0 12px; white-space: nowrap; color: #8da6bf; transition: color 160ms, background-color 160ms; }
.gcode li .n { color: #647f9f; margin-right: 10px; }
.gcode li.is-current { color: var(--accent-hover); background: rgba(139, 197, 255, 0.1); }
.gcode li.is-current .n { color: var(--accent); }
.gcode li.is-done { color: #6f8bab; }

.machine-controls {
  position: absolute; right: 14px; bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.machine-hint { font-size: 0.8125rem; color: var(--muted); pointer-events: none; }
.machine-toggle .i-play { display: none; }
.machine-toggle.is-paused .i-play { display: block; }
.machine-toggle.is-paused .i-pause { display: none; }
.machine-stage.no-webgl .machine-controls, .machine-stage.no-webgl .gcode { display: none; }

/* Основная надпись (штамп чертежа) */
.title-block {
  display: grid; grid-template-columns: 1.15fr 1fr 0.6fr; gap: 1px;
  background: var(--blue-soft); border: 1px solid var(--blue-soft);
}
.tb-cell { background: var(--bg); padding: 8px 12px 10px; min-width: 0; }
.tb-cell dt { font-size: 0.75rem; color: var(--blue); line-height: 1.3; margin-bottom: 2px; }
.tb-cell dd { font-size: 0.9375rem; line-height: 1.35; }
.tb-name dd { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; }
.tb-wide { grid-column: span 2; }

/* ---------- Секции ---------- */
.section { padding: clamp(80px, 10vw, 140px) 0; position: relative; }
.section:nth-of-type(even) { background: var(--bg-2); }
.section-head { margin-bottom: clamp(40px, 5vw, 64px); max-width: 760px; }
.section-head h2, .about-body h2, .faq-grid h2, .contacts-copy h2 {
  font-size: clamp(2.25rem, 1.3rem + 3.4vw, 4rem);
  font-variation-settings: 'wdth' 85;
  letter-spacing: -0.005em;
}
.section-head h2 { margin-bottom: 16px; }
.section-sub { color: var(--muted); font-size: 1.0625rem; max-width: 40em; }
.section-head-row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }

/* ---------- Услуги ---------- */
.service-list { border-top: 1px solid var(--line); }
.service {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.62fr);
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(32px, 4vw, 56px) 0;
  border-bottom: 1px solid var(--line);
}
.service-icon { width: 64px; height: 64px; margin-bottom: 24px; }
.service-icon path, .service-icon circle, .service-icon rect, .service-icon line, .service-icon polyline {
  fill: none; stroke: var(--blue); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.service-icon .accent { stroke: var(--accent); }
.service h3 {
  font-size: clamp(1.625rem, 1.1rem + 1.6vw, 2.375rem); font-variation-settings: 'wdth' 85; margin-bottom: 14px;
}
.service-text { color: #bfd0e4; max-width: 32em; }
.service-list-items li {
  position: relative; padding: 10px 0 10px 28px; border-bottom: 1px dashed var(--line);
}
.service-list-items li:last-child { border-bottom: 0; }
.service-list-items li::before {
  content: ''; position: absolute; left: 2px; top: 21px; width: 12px; height: 1px; background: var(--accent);
}
.service-side { display: flex; flex-direction: column; gap: 20px; }
.service-side h4 { margin: 0 0 8px; font-size: 0.8125rem; font-weight: 500; color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 0.8125rem; padding: 4px 10px; border: 1px solid var(--line-strong); color: #bfd0e4; white-space: nowrap;
}
.service-price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.service-price-link { font-size: 0.875rem; color: var(--muted); text-underline-offset: 3px; }
.service-price-link:hover { color: var(--text); }

/* Рисование иконок */
.js .service-icon [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease-out); }
.js .service.is-drawn .service-icon [pathLength] { stroke-dashoffset: 0; }

/* ---------- Работы ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); background: transparent;
  font-size: 0.9375rem; color: var(--muted); display: inline-flex; align-items: center; gap: 8px;
  transition: color var(--dur), border-color var(--dur), background-color var(--dur);
}
.filter .count { font-size: 0.8125rem; color: var(--blue); font-variant-numeric: tabular-nums; }
.filter:hover { color: var(--text); border-color: var(--blue); }
.filter[aria-pressed='true'] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.filter[aria-pressed='true'] .count { color: var(--on-accent); opacity: 0.7; }

.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.work-grid > li[hidden] { display: none; }
.work-card {
  width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); padding: 0;
  display: flex; flex-direction: column; height: 100%;
  transition: border-color var(--dur) var(--ease-out);
}
.work-card:hover { border-color: var(--blue); }
.work-card:focus-visible { outline-offset: 2px; }
.work-thumb {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(112, 170, 231, 0.2), transparent 70%),
    linear-gradient(var(--blue-faint) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--blue-faint) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.work-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform 600ms var(--ease-out), opacity 400ms; }
.work-thumb img.is-cover { object-fit: cover; }
.work-card:hover .work-thumb img { transform: scale(1.04); }
.work-thumb.is-loading::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(112, 170, 231, 0.12) 50%, transparent 70%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.work-badge {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 500; padding: 4px 8px;
  background: rgba(11, 21, 36, 0.85); border: 1px solid var(--line-strong); color: var(--text);
}
.work-badge svg { width: 14px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; }
.work-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.work-tags { font-size: 0.8125rem; color: var(--blue); }
.work-title { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.2; }
.work-text {
  color: var(--muted); font-size: 0.9375rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.works-empty { color: var(--muted); padding: 32px 0; }

/* ---------- Процесс ---------- */
.process-track { position: relative; }
.process-rail { position: absolute; left: 0; right: 0; top: 30px; height: 2px; background: var(--line); }
.process-rail-fill {
  position: absolute; inset: 0; background: var(--accent);
  transform: scaleX(var(--p, 0)); transform-origin: left;
}
.process-tool {
  position: absolute; top: 50%; left: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 2px solid var(--accent); border-radius: 50%; background: var(--bg-2);
  transform: translateX(calc(var(--p, 0) * var(--rail-w, 0px)));
}
.process-tool::before, .process-tool::after { content: ''; position: absolute; background: var(--accent); }
.process-tool::before { left: 50%; top: -7px; bottom: -7px; width: 1px; }
.process-tool::after { top: 50%; left: -7px; right: -7px; height: 1px; }
.process-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); counter-reset: step; }
.process-step { padding-top: 64px; position: relative; }
.process-step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums;
  width: 60px; height: 60px; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line-strong); color: var(--muted);
  transition: color 300ms, border-color 300ms, background-color 300ms;
}
.process-step.is-done::before { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.process-step h3 { font-size: 1.5rem; margin: 20px 0 10px; font-variation-settings: 'wdth' 85; }
.process-step p { color: var(--muted); }

/* ---------- Цены (спецификация) ---------- */
.spec table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.spec caption { text-align: left; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 16px 20px; border: 1px solid var(--line); }
.spec thead th { font-size: 0.8125rem; font-weight: 500; color: var(--blue); padding-block: 10px; background: var(--bg); }
.spec .col-price { text-align: right; white-space: nowrap; width: 1%; }
.spec .col-term { white-space: nowrap; width: 1%; color: #bfd0e4; }
.spec-group th {
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; text-align: center;
  padding-block: 18px 14px; background: var(--surface);
  text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.spec td.name { font-weight: 500; }
.spec td.note { color: var(--muted); }
.spec td.col-price { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; color: var(--accent); }
.spec tbody tr:not(.spec-group) { transition: background-color var(--dur); }
.spec tbody tr:not(.spec-group):hover { background: rgba(112, 170, 231, 0.06); }
.prices-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }
.prices-cta p { color: var(--muted); }

/* ---------- О себе ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.about-photo { margin: 0; position: relative; aspect-ratio: 4 / 5; border: 1px solid var(--blue-soft); background: var(--bg); overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.2) contrast(1.05); }
.about-photo.is-empty { display: grid; place-items: center; }
.about-photo.is-empty svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-photo.is-empty svg line { stroke: var(--blue-soft); stroke-width: 1; }
.about-photo figcaption { position: relative; color: var(--muted); font-size: 0.9375rem; background: var(--bg); padding: 4px 12px; }
.about-body h2 { margin-bottom: 28px; }
.about-text p { color: #bfd0e4; font-size: 1.125rem; max-width: 36em; }
.about-text p + p { margin-top: 16px; }
.about-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 40px 0; }
.about-facts div { background: var(--bg); padding: 16px 18px; }
.about-facts dt { font-size: 0.8125rem; color: var(--blue); margin-bottom: 4px; }
.about-facts dd { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.25; }
.software { display: grid; gap: 20px; }
.software h3 { font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; color: var(--blue); margin-bottom: 8px; }

/* ---------- Вопросы ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; font-family: var(--font-display); font-weight: 600; font-size: 1.1875rem; line-height: 1.3;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .plus { flex: none; width: 20px; height: 20px; position: relative; }
.faq-list summary .plus::before, .faq-list summary .plus::after {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--accent);
  transition: transform 300ms var(--ease-out);
}
.faq-list summary .plus::after { transform: rotate(90deg); }
.faq-list details[open] summary .plus::after { transform: rotate(0deg); }
.faq-list summary:hover { color: var(--accent-hover); }
.faq-list .answer { color: #bfd0e4; padding: 0 0 24px; max-width: 40em; }

/* ---------- Контакты ---------- */
.contacts-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contacts-copy h2 { margin-bottom: 16px; max-width: 12em; }
.channels { margin-top: 40px; border-top: 1px solid var(--line); }
.channels a {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: color var(--dur);
}
.channels .ch-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-strong); transition: border-color var(--dur), background-color var(--dur); }
.channels .ch-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.channels .ch-label { font-size: 0.8125rem; color: var(--muted); display: block; }
.channels .ch-value { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.channels .ch-go { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.6; transition: transform var(--dur) var(--ease-out), stroke var(--dur); }
.channels a:hover .ch-icon { border-color: var(--accent); background: rgba(139, 197, 255, 0.08); }
.channels a:hover .ch-go { transform: translate(3px, -3px); stroke: var(--accent); }

.brief { background: var(--surface); border: 1px solid var(--line); padding: clamp(24px, 3vw, 40px); display: grid; gap: 20px; }
.field label { display: block; font-size: 0.9375rem; margin-bottom: 8px; color: #bfd0e4; }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font-size: 1rem;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 0;
  transition: border-color var(--dur);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #89a2bd; }
.field input:hover, .field textarea:hover { border-color: var(--blue); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.875rem; margin-top: 6px; min-height: 0; }
.field-error:empty { display: none; }
.brief .btn { justify-self: start; }
.brief-note { font-size: 0.875rem; color: var(--muted); }

/* ---------- Подвал ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 0.9375rem; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { text-underline-offset: 3px; }
.site-footer a:hover { color: var(--text); }

/* ---------- Окно работы ---------- */
.work-modal {
  width: min(1240px, calc(100vw - 32px)); height: min(800px, calc(100dvh - 32px));
  max-width: none; max-height: none; padding: 0; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--text); overflow: hidden;
}
.work-modal::backdrop { background: rgba(7, 13, 23, 0.72); backdrop-filter: blur(4px); }
.wm-shell { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 380px; height: 100%; }
.wm-stage { position: relative; min-height: 0; background:
  radial-gradient(ellipse at 50% 55%, rgba(112, 170, 231, 0.18), transparent 70%), var(--bg); }
.wm-view { position: absolute; inset: 0; }
.wm-view[hidden] { display: none; }
.wm-canvas { width: 100%; height: 100%; touch-action: none; cursor: grab; }
.wm-canvas:active { cursor: grabbing; }
.wm-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); pointer-events: none; }
.wm-loading[hidden] { display: none; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wm-error { position: absolute; inset: auto 24px 50% 24px; text-align: center; color: var(--danger); }
.wm-toolbar {
  position: absolute; left: 16px; bottom: 16px; right: 16px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none;
}
.wm-toolbar > * { pointer-events: auto; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); background: rgba(11, 21, 36, 0.85); }
.seg button {
  min-height: 40px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); font-size: 0.875rem;
  transition: color var(--dur), background-color var(--dur);
}
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-checked='true'] { color: var(--on-accent); background: var(--accent); }
.seg button:not([aria-checked='true']):hover { color: var(--text); }
.tool-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line-strong); background: rgba(11, 21, 36, 0.85); color: var(--muted); font-size: 0.875rem;
  transition: color var(--dur), border-color var(--dur);
}
.tool-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tool-btn:hover { color: var(--text); border-color: var(--blue); }
.tool-btn[aria-pressed='true'] { color: var(--accent-hover); border-color: var(--accent); }
.wm-dims {
  position: absolute; top: 16px; left: 16px; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--blue);
  background: rgba(11, 21, 36, 0.8); padding: 4px 10px; border: 1px solid var(--line);
}
.wm-dims:empty { display: none; }
.wm-image { width: 100%; height: calc(100% - 88px); object-fit: contain; padding: 24px; }
.wm-thumbs { display: flex; gap: 8px; padding: 0 16px; height: 88px; align-items: center; overflow-x: auto; }
.wm-thumbs button { flex: none; width: 88px; height: 64px; padding: 0; border: 1px solid var(--line-strong); background: var(--surface); }
.wm-thumbs button[aria-current='true'] { border-color: var(--accent); }
.wm-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.wm-info {
  border-left: 1px solid var(--line); padding: 64px 28px 24px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px; background: var(--bg-2);
}
.wm-tabs { display: flex; gap: 6px; }
.wm-tabs[hidden] { display: none; }
.wm-tabs button {
  min-height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-size: 0.875rem;
}
.wm-tabs button[aria-selected='true'] { color: var(--text); border-color: var(--accent); }
.wm-tags { font-size: 0.8125rem; color: var(--blue); }
.wm-title { font-size: 1.875rem; font-variation-settings: 'wdth' 85; line-height: 1.1; }
.wm-text { color: #bfd0e4; }
.wm-specs { display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--line); margin-top: 4px; }
.wm-specs dt, .wm-specs dd { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.wm-specs dt { color: var(--muted); padding-right: 20px; }
.wm-cta { margin-top: 8px; align-self: flex-start; }
.wm-nav { margin-top: auto; padding-top: 20px; display: flex; justify-content: space-between; gap: 8px; }
.wm-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--bg);
  transition: border-color var(--dur), color var(--dur);
}
.wm-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.wm-close:hover { border-color: var(--accent); color: var(--accent-hover); }
.work-modal:fullscreen, .wm-stage:fullscreen { width: 100vw; height: 100vh; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .nav { display: none; }
  .burger { display: block; }
  .header-cta { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: calc(var(--header-h) + 32px); }
  .hero-machine { max-width: 760px; }
  .service { grid-template-columns: 1fr 1fr; }
  .service-main { grid-column: 1 / -1; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wm-shell { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (min-width: 1101px) {
  .mobile-menu { display: none; }
}
@media (pointer: coarse) {
  .machine-hint { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  :root { --header-h: 64px; }
  .brand-role { display: none; }
  .sheet-frame { display: none; }
  .hero { min-height: auto; padding-bottom: 32px; }
  .hero-title { font-size: clamp(2.5rem, 10.6vw, 4.25rem); }
  .machine-stage { aspect-ratio: 1 / 1; margin-inline: calc(var(--gutter) * -1); width: calc(100% + var(--gutter) * 2); border-inline: 0; }
  .gcode { width: calc(100% - 84px); height: calc(1.6em * 4 + 16px); }
  .machine-toggle span { display: none; }
  .machine-toggle { min-width: 44px; min-height: 44px; justify-content: center; }
  .dro { font-size: 0.75rem; min-width: 116px; }
  .machine-hint { display: none; }
  .title-block { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: dense; }
  .tb-wide { grid-column: 1 / -1; }
  .machine-op { max-width: calc(100% - 160px); font-size: 0.8125rem; line-height: 1.3; align-items: flex-start; }
  .op-dot { margin-top: 4px; flex: none; }
  .service { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .process-rail { top: 0; bottom: 0; left: 29px; right: auto; width: 2px; height: auto; }
  .process-rail-fill { transform: scaleY(var(--p, 0)); transform-origin: top; }
  .process-tool { left: 50%; top: 0; margin: -11px 0 0 -11px; transform: translateY(calc(var(--p, 0) * var(--rail-h, 0px))); }
  .process-steps { grid-template-columns: 1fr; gap: 32px; }
  .process-step { padding: 0 0 0 84px; min-height: 60px; }
  .process-step h3 { margin-top: 12px; }
  .spec thead { display: none; }
  .spec table, .spec tbody, .spec tr, .spec td, .spec th { display: block; width: 100%; }
  .spec tr:not(.spec-group) { border: 1px solid var(--line); border-top: 0; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; }
  .spec td { border: 0; padding: 0; }
  .spec td.name { grid-column: 1; }
  .spec td.col-price { grid-column: 2; grid-row: 1; width: auto; }
  .spec td.note { grid-column: 1 / -1; }
  .spec td.col-term { grid-column: 1 / -1; width: auto; font-size: 0.875rem; }
  .spec td.col-term::before { content: 'Срок: '; color: var(--muted); }
  .spec-group th { border: 1px solid var(--line); margin-top: 16px; }
  .about-grid, .faq-grid, .contacts-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; }
  .about-facts { grid-template-columns: 1fr; }
  .work-modal { width: 100vw; height: 100dvh; border: 0; }
  .wm-shell { grid-template-columns: 1fr; grid-template-rows: 52dvh minmax(0, 1fr); }
  .wm-info { border-left: 0; border-top: 1px solid var(--line); padding: 20px 16px 24px; }
  .wm-toolbar .tool-btn span { display: none; }
  .wm-toolbar .tool-btn { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .wm-toolbar [data-act='fullscreen'] { display: none; }
  .seg button { min-height: 44px; padding: 0 10px; }
  .wm-toolbar { left: 12px; right: 12px; bottom: 12px; }
  .wm-dims { top: 12px; left: 12px; }
  .wm-nav .tool-btn span { display: inline; }
}

@media (max-width: 380px) {
  .spec tr:not(.spec-group) { grid-template-columns: minmax(0, 1fr); }
  .spec td.col-price { grid-column: 1; grid-row: auto; text-align: left; }
}

/* ---------- Без анимаций ---------- */
@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) *, html:not(.force-motion) *::before, html:not(.force-motion) *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important;
  }
  html:not(.force-motion) .service-icon [pathLength] { stroke-dashoffset: 0; }
}

.film-player { min-width: 0; align-self: start; width: 100%; padding: clamp(12px, 1.5vw, 22px); background: #112036; border: 1px solid var(--line-strong); }
.film-head, .film-transport { display: flex; align-items: center; gap: 1rem; }
.film-head { justify-content: space-between; margin-bottom: 12px; color: var(--accent-hover); font: 500 .875rem var(--font-mono); }
.film-time { color: var(--muted); }
.film-screen { aspect-ratio: 16/10; background: #0a1422; overflow: hidden; cursor: ew-resize; touch-action: pan-y; }
.film-screen video { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.film-transport { padding-top: 12px; }
.film-transport input { flex: 1; min-width: 0; accent-color: var(--accent); cursor: pointer; }
.film-player button { color: var(--text); background: var(--bg-2); border: 1px solid var(--line-strong); padding: .55rem .75rem; font: inherit; font-size: .875rem; cursor: pointer; }
.film-player .film-play { min-width: 5.2rem; font-weight: 600; background: var(--accent); color: var(--on-accent); }
.film-hint { color: var(--muted); margin: .65rem 0 1rem; font-size: .875rem; }
.film-choices { display: flex; flex-wrap: wrap; gap: .4rem; }
.film-choices button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-hover); }
.process-media { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: clamp(1rem, 3vw, 3rem); margin-block: 2rem 4rem; }
.process-interactive h3 { font-family: var(--font-display); margin: 0 0 .75rem; }
.price-photo { display: inline-block; margin-top: 1rem; text-decoration: underline; color: var(--accent-hover); }
@media(max-width: 760px) {
  .process-media { grid-template-columns: 1fr; }
  .process-interactive .machine-stage { width: 100%; margin-inline: 0; }
}

.process-film { max-width:760px; margin-inline:auto; }
.film-screen video {object-fit:cover;}
.cad-drop,.quote { display:flex; flex-wrap:wrap; align-items:center; gap:1rem; padding:clamp(18px,3vw,36px); margin:1.5rem 0; border:1px solid var(--line-strong); background:var(--surface); }
.cad-drop h3,.quote h3 {font:600 1.35rem var(--font-display);margin:0 0 .5rem;}
.cad-drop p {color:var(--muted);margin:0;}
.cad-label {position:relative;overflow:hidden;cursor:pointer;margin-left:auto;}
.cad-label input {position:absolute;inset:0;opacity:0;width:100%;cursor:pointer;}
.cad-label:focus-within,.drag-over {outline:2px solid var(--accent);}
#cad-status:not(:empty),.quote h3 {flex-basis:100%;}
#cad-status:empty {display:none;}
.quote {align-items:end;scroll-margin-top:6rem;}
.quote .field {max-width:100%;margin:0;}
.quote input {max-width:8rem;}
#quote-total {font:600 1.4rem var(--font-display);color:var(--accent-hover);}
.field select {max-width:100%;width:100%;background:var(--bg);color:var(--text);padding:.75rem;font:inherit;border:1px solid var(--line-strong);}
.spec td.name a {text-decoration:underline;text-underline-offset:.25em;}
#order-context,.section-controls {padding:.8rem;border:1px solid var(--line);margin-bottom:1rem;}
.section-controls label,.section-controls input[type=range] {display:block;}
.section-controls input {accent-color:var(--accent);}
#cut-position {margin-top:.6rem;}
[hidden] {display:none!important;}
@media(max-width:600px){.cad-label{margin-left:0}.quote{display:grid}.quote .btn{white-space:normal}}

#order-context:not([hidden]) {display:block;width:100%;box-sizing:border-box;overflow-wrap:anywhere;margin:0 0 1rem;}
