/* ============================================================
   ПСК Апекс — сайт производства металлоизделий полного цикла
   Темы оформления:
     ember  — графит/искра (по умолчанию, тёмная)
     steel  — белый лист (светлая, «чертёжная»)
     hazard — цех (чёрный + сигнальный жёлтый)
     trust  — доверие (корпоративный синий + оранжевая кнопка, светлая)
     forge  — горячая заявка (тёмный + красный, срочность)
     copper — тёплый металл (медь/бронза, тёплая тёмная)
   Переключатель тем — внизу слева (только для предпросмотра,
   на боевом сайте удалите блок .theme-switch из HTML).
   ============================================================ */

:root {
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
  --container: 1280px;
  --pad: 20px;
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- ТЕМА 1: ГРАФИТ / ИСКРА (по умолчанию, тёмная) ---------- */
:root, html[data-theme="ember"] {
  --bg: #0A0B0D;
  --panel: #121316;
  --panel-2: #17191D;
  --line: #262A31;
  --line-strong: #3A404A;
  --text: #FBFBFB;
  --muted: #B8BCC4;
  --faint: #69707A;
  --accent: #FF9E40;
  --accent-soft: rgba(255, 158, 64, 0.12);
  --accent-ink: #201305;
  --glow: 0 0 18px rgba(255, 158, 64, 0.25), 0 0 42px rgba(255, 158, 64, 0.10);
  --hero-grid: rgba(255, 255, 255, 0.045);
  --ok: #6FCF97;
  color-scheme: dark;
}

/* ---------- ТЕМА 2: БЕЛЫЙ ЛИСТ (светлая, «чертёжная») ---------- */
html[data-theme="steel"] {
  --bg: #F5F5F0;
  --panel: #FFFFFF;
  --panel-2: #EDEDE6;
  --line: #1A1A1A;
  --line-strong: #1A1A1A;
  --text: #111111;
  --muted: #55534E;
  --faint: #8B887F;
  --accent: #E73B1D;
  --accent-soft: rgba(231, 59, 29, 0.08);
  --accent-ink: #FFFFFF;
  --glow: none;
  --hero-grid: rgba(0, 0, 0, 0.06);
  --ok: #1E8E4E;
  color-scheme: light;
}

/* ---------- ТЕМА 3: ЦЕХ (чёрный + сигнальный жёлтый) ---------- */
html[data-theme="hazard"] {
  --bg: #0E0E10;
  --panel: #161618;
  --panel-2: #1D1D20;
  --line: #2C2C30;
  --line-strong: #45454C;
  --text: #F5F5F0;
  --muted: #C9C9C2;
  --faint: #7A7A72;
  --accent: #FFD400;
  --accent-soft: rgba(255, 212, 0, 0.10);
  --accent-ink: #161300;
  --glow: 0 0 18px rgba(255, 212, 0, 0.18), 0 0 42px rgba(255, 212, 0, 0.07);
  --hero-grid: rgba(255, 212, 0, 0.05);
  --ok: #6FCF97;
  color-scheme: dark;
}

/* Отдельный цвет «продающей» кнопки (по умолчанию = акценту темы) */
:root {
  --cta: var(--accent);
  --cta-ink: var(--accent-ink);
}

/* ---------- ТЕМА 4: ДОВЕРИЕ (корпоративный синий + оранжевая кнопка, светлая) ----------
   Психология: синий = надёжность, профессионализм, «с этими людям спокойно» —
   стандарт доверия в B2B. Оранжевая кнопка — контрастный к синему цвет действия,
   самый кликабельный CTA. Светлый фон читается «честно и открыто». */
html[data-theme="trust"] {
  --bg: #F3F6FA;
  --panel: #FFFFFF;
  --panel-2: #E9EFF7;
  --line: #D3DEEB;
  --line-strong: #A9BDD6;
  --text: #12233D;
  --muted: #4A5B74;
  --faint: #8595AB;
  --accent: #1E5BD7;
  --accent-soft: rgba(30, 91, 215, 0.09);
  --accent-ink: #FFFFFF;
  --glow: none;
  --hero-grid: rgba(30, 91, 215, 0.07);
  --cta: #FF7A1A;
  --cta-ink: #1F0E00;
  --ok: #1E8E4E;
  color-scheme: light;
}

/* ---------- ТЕМА 5: ГОРЯЧАЯ ЗАЯВКА (тёмный + красный) ----------
   Психология: красный = энергия, срочность, «горячий металл», подталкивает
   к быстрому решению. На тёмном фоне красная кнопка не выглядит агрессивно,
   но работает как сигнал «действуй сейчас». */
html[data-theme="forge"] {
  --bg: #0D0A0A;
  --panel: #161112;
  --panel-2: #1D1617;
  --line: #2F2426;
  --line-strong: #4C3639;
  --text: #FBF5F3;
  --muted: #C8B9B5;
  --faint: #7F6E69;
  --accent: #F03522;
  --accent-soft: rgba(240, 53, 34, 0.12);
  --accent-ink: #FFFFFF;
  --glow: 0 0 18px rgba(240, 53, 34, 0.25), 0 0 42px rgba(240, 53, 34, 0.10);
  --hero-grid: rgba(240, 53, 34, 0.05);
  --ok: #6FCF97;
  color-scheme: dark;
}

/* ---------- ТЕМА 6: ТЁПЛЫЙ МЕТАЛЛ (медь/бронза, тёплая тёмная) ----------
   Психология: тёплые медно-коричневые тона = уют, «ручная работа», премиальность.
   Хорошо работает на частного клиента: дача, благоустройство, мангалы, мебель. */
html[data-theme="copper"] {
  --bg: #151009;
  --panel: #1E1710;
  --panel-2: #261D14;
  --line: #3A2C1E;
  --line-strong: #57432C;
  --text: #F7F0E6;
  --muted: #CDBCA4;
  --faint: #8B7860;
  --accent: #E0873F;
  --accent-soft: rgba(224, 135, 63, 0.12);
  --accent-ink: #241203;
  --glow: 0 0 18px rgba(224, 135, 63, 0.22), 0 0 42px rgba(224, 135, 63, 0.08);
  --hero-grid: rgba(224, 135, 63, 0.05);
  --ok: #6FCF97;
  color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0; text-transform: uppercase; letter-spacing: 0.01em; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--font-mono); }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-lg { width: 30px; height: 30px; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.logo .logo-mark { width: 34px; height: 34px; flex: none; }
.logo em { font-style: normal; color: var(--accent); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 8px 12px; border: 1px solid transparent; border-radius: var(--r-xs); color: var(--muted);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.nav a:hover, .nav a.active { border-color: var(--line-strong); color: var(--text); }
.header-phone { font-family: var(--font-mono); font-size: 14px; font-weight: 500; white-space: nowrap; }
.header-phone:hover { color: var(--accent); }
.burger { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r-xs); color: var(--text); padding: 8px; cursor: pointer; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em;
  padding: 13px 22px; border-radius: var(--r-xs); cursor: pointer;
  border: 1px solid transparent; transition: all 0.25s var(--ease); white-space: nowrap;
}
.btn-primary { background: var(--cta); color: var(--cta-ink); box-shadow: var(--glow); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary .icon { transition: transform 0.25s var(--ease); }
.btn-primary:hover .icon { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 9px 14px; font-size: 12px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: gridPan 42s linear infinite;
}
@keyframes gridPan { from { background-position: 0 0; } to { background-position: 56px 56px; } }
.hero-in {
  position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px; padding: 88px 0 72px; align-items: center;
}
.hero-kicker { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 26px; }
.hero-kicker::before { content: ""; width: 34px; height: 1px; background: var(--accent); }
.hero h1 { font-size: clamp(38px, 5.4vw, 74px); font-weight: 700; margin-bottom: 8px; }
.hero h1 .dash { display: inline-block; width: 0.9em; height: 0.09em; background: var(--accent); vertical-align: middle; margin: 0 0.12em; box-shadow: var(--glow); animation: dashGrow 1.2s var(--ease) 0.3s backwards; transform-origin: left; }
@keyframes dashGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-sub { font-family: var(--font-display); font-size: clamp(17px, 1.8vw, 24px); text-transform: uppercase; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 22px; }
.hero-sub b { color: var(--text); font-weight: 600; }
.hero-desc { max-width: 52ch; color: var(--muted); margin-bottom: 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-facts { display: flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.hero-facts li { flex: 1; padding: 14px 18px; border-left: 1px solid var(--line); }
.hero-facts li:first-child { border-left: 0; }
.hero-facts .num { font-family: var(--font-mono); font-size: 20px; font-weight: 600; color: var(--accent); }
.hero-facts .lbl { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* Визуал hero: «лазерный рез» на металлической пластине */
.hero-visual { position: relative; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--panel); padding: 26px; box-shadow: var(--glow); }
.hv-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 16px; }
.hv-head .live { color: var(--accent); display: flex; align-items: center; gap: 7px; }
.hv-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.hv-plate { position: relative; border: 1px solid var(--line); border-radius: var(--r-xs); background:
  repeating-linear-gradient(0deg, transparent 0 23px, var(--line) 23px 24px),
  repeating-linear-gradient(90deg, transparent 0 23px, var(--line) 23px 24px),
  var(--panel-2);
  aspect-ratio: 4 / 3; overflow: hidden;
}
.hv-cut { position: absolute; inset: 0; }
.hv-cut path.part { stroke: var(--line-strong); stroke-width: 1.6; fill: none; }
.hv-cut path.beam { stroke: var(--accent); stroke-width: 2.4; fill: none; filter: drop-shadow(0 0 6px var(--accent)); stroke-dasharray: 520; stroke-dashoffset: 520; animation: cut 5.5s var(--ease) infinite; }
@keyframes cut { 0% { stroke-dashoffset: 520; } 55% { stroke-dashoffset: 0; } 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.hv-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-xs); overflow: hidden; margin-top: 16px; }
.hv-meta div { background: var(--panel); padding: 10px 12px; }
.hv-meta .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.hv-meta .v { font-family: var(--font-mono); font-size: 15px; color: var(--text); margin-top: 3px; }

/* ---------- Секции ---------- */
.section { padding: 84px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 14px; }
.sec-num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.sec-label { font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--faint); }
.sec-title { font-size: clamp(28px, 3.6vw, 46px); max-width: 20ch; margin-bottom: 14px; }
.sec-desc { max-width: 62ch; color: var(--muted); margin-bottom: 44px; }

/* ---------- Процессы (полоса) ---------- */
.process-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.process-strip li { padding: 22px; border-left: 1px solid var(--line); position: relative; transition: background 0.3s var(--ease); }
.process-strip li:first-child { border-left: 0; }
.process-strip li:hover { background: var(--panel); }
.process-strip .p-num { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.process-strip .icon { color: var(--accent); margin: 10px 0 12px; }
.process-strip h3 { font-size: 17px; }
.process-strip p { font-size: 13px; color: var(--muted); margin-top: 6px; }
.process-strip li:not(:last-child)::after {
  content: ""; position: absolute; right: -7px; top: 50%; transform: translateY(-50%) rotate(45deg);
  width: 12px; height: 12px; border-top: 1.5px solid var(--accent); border-right: 1.5px solid var(--accent); z-index: 2;
}

/* ---------- Карточки услуг / отраслей ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg); padding: 26px; position: relative;
  transition: background 0.3s var(--ease);
}
.card:hover { background: var(--panel); }
.card .icon { color: var(--accent); margin-bottom: 16px; }
.card h3 { font-size: 19px; margin-bottom: 9px; }
.card p { font-size: 13.5px; color: var(--muted); }
.card .card-link { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-top: 16px; }
.card .card-link .icon { width: 15px; height: 15px; margin: 0; transition: transform 0.25s var(--ease); }
.card:hover .card-link .icon { transform: translateX(4px); }
.card .tag { position: absolute; top: 18px; right: 18px; font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); border: 1px solid var(--accent); border-radius: 99px; padding: 3px 10px; }

/* ---------- Каталог (плитка категорий) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cat-card {
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel);
  padding: 20px; display: flex; flex-direction: column; gap: 12px; min-height: 168px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.cat-card .icon-lg { color: var(--accent); }
.cat-card h3 { font-size: 16.5px; margin-top: auto; }
.cat-card .cnt { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.cat-card.wide { grid-column: span 2; }

/* ---------- Карточки товаров ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.prod-card { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.25s var(--ease); }
.prod-card:hover { border-color: var(--line-strong); }
html[data-theme="steel"] .prod-card:hover { border-color: var(--text); }
.prod-thumb { aspect-ratio: 1 / 1; background: var(--panel-2); display: grid; place-items: center; border-bottom: 1px solid var(--line); position: relative; }
.prod-thumb .icon { width: 56px; height: 56px; color: var(--faint); stroke-width: 1.1; transition: color 0.25s var(--ease), transform 0.35s var(--ease); }
.prod-card:hover .prod-thumb .icon { color: var(--accent); transform: scale(1.08); }
.prod-thumb .ph { position: absolute; bottom: 8px; right: 10px; font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); opacity: 0.8; }
.prod-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.prod-body h3 { font-size: 15px; line-height: 1.2; text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-weight: 600; }
.prod-meta { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }
.prod-price { font-family: var(--font-mono); font-size: 15.5px; font-weight: 600; color: var(--text); }
.prod-price small { font-weight: 400; color: var(--faint); font-size: 11px; }
.prod-foot { margin-top: auto; display: flex; gap: 8px; }
.prod-foot .btn { flex: 1; justify-content: center; }
.cat-block { margin-bottom: 64px; scroll-margin-top: 84px; }
.cat-block-head { display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 22px; }
.cat-block-head h2 { font-size: clamp(22px, 2.6vw, 32px); }
.cat-block-head .cnt { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.cat-block-head .icon-lg { color: var(--accent); align-self: center; }
.cat-anchor-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; position: sticky; top: 64px; z-index: 50; background: var(--bg); padding: 14px 0; border-bottom: 1px solid var(--line); }
.cat-anchor-nav a { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); transition: all 0.25s var(--ease); }
.cat-anchor-nav a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- RAL ---------- */
.ral-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ral { width: 20px; height: 20px; border-radius: 4px; border: 1px solid rgba(128,128,128,0.4); cursor: pointer; position: relative; transition: transform 0.2s var(--ease); }
.ral:hover { transform: scale(1.25); z-index: 2; }
.ral-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); margin-left: 4px; }
.ral-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.ral-chip { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: var(--r-xs); padding: 8px 10px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.ral-chip i { width: 18px; height: 18px; border-radius: 4px; flex: none; border: 1px solid rgba(128,128,128,0.35); }

/* ---------- Таблица цен ---------- */
.price-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; font-size: 14px; }
.price-table th { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); text-align: left; padding: 13px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.price-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); }
.price-table tr:last-child td { border-bottom: 0; }
.price-table td:first-child { color: var(--muted); }
.price-table tbody tr:hover td { background: var(--accent-soft); }
.price-table .grp td { background: var(--panel); font-family: var(--font-body); font-weight: 600; text-transform: uppercase; font-size: 12.5px; letter-spacing: 0.06em; color: var(--text); }
.table-note { font-size: 12.5px; color: var(--faint); margin-top: 12px; font-family: var(--font-mono); }

/* ---------- Шаги ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; counter-reset: step; }
.step { background: var(--bg); padding: 26px 22px; }
.step .s-num { font-family: var(--font-mono); font-size: 30px; font-weight: 600; color: var(--accent); }
.step h3 { font-size: 17px; margin: 12px 0 8px; }
.step p { font-size: 13px; color: var(--muted); }

/* ---------- Отрасли ---------- */
.ind-card ul { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.ind-card ul li { font-size: 13px; color: var(--muted); padding-left: 16px; position: relative; }
.ind-card ul li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 1.5px; background: var(--accent); }

/* ---------- Портфолио ---------- */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.work { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--panel); }
.work .work-img { aspect-ratio: 4 / 3; background: var(--panel-2); display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.work .work-img .icon { width: 44px; height: 44px; color: var(--faint); stroke-width: 1.1; }
.work .work-body { padding: 14px 16px; }
.work h3 { font-size: 15px; text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-weight: 600; }
.work .work-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); margin-top: 5px; }

/* ---------- Форма ---------- */
.cta-block { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.form { border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--panel); padding: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field label { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.field input[type="text"], .field input[type="tel"], .field textarea, .field select {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-xs);
  padding: 12px 14px; color: var(--text); font-family: var(--font-body); font-size: 14.5px;
  transition: border-color 0.25s var(--ease); width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 74px; }
.file-drop {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-xs); padding: 20px;
  display: flex; align-items: center; gap: 14px; cursor: pointer; color: var(--muted);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease); font-size: 13.5px;
}
.file-drop:hover, .file-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.file-drop .icon { color: var(--accent); }
.file-drop input { display: none; }
.file-drop .fname { font-family: var(--font-mono); color: var(--ok); font-size: 12.5px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--faint); margin: 4px 0 18px; }
.agree input { margin-top: 3px; accent-color: var(--accent); }
.form-status { font-family: var(--font-mono); font-size: 13px; margin-top: 14px; display: none; }
.form-status.ok { display: block; color: var(--ok); }
.form-status.err { display: block; color: #E76A6A; }
.cta-points { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; margin-top: 30px; }
.cta-points li { display: flex; gap: 14px; align-items: center; padding: 15px 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.cta-points li:first-child { border-top: 0; }
.cta-points .icon { color: var(--accent); width: 19px; height: 19px; }

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.faq details { border-top: 1px solid var(--line); background: var(--bg); }
.faq details:first-child { border-top: 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 19px 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--font-display); font-size: 17px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.02em;
  transition: color 0.2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 20px; color: var(--accent); transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq .faq-body { padding: 0 22px 20px; color: var(--muted); font-size: 14px; max-width: 72ch; }

/* ---------- Контакты / футер ---------- */
.contacts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.contact-cell { background: var(--bg); padding: 24px; }
.contact-cell .icon { color: var(--accent); margin-bottom: 12px; }
.contact-cell .k { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 6px; }
.contact-cell .v { font-size: 16px; font-weight: 600; }
.contact-cell .v a:hover { color: var(--accent); }
.contact-cell .s { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.footer { border-top: 1px solid var(--line); padding: 34px 0 90px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--faint); font-family: var(--font-mono); }
.footer-in a:hover { color: var(--accent); }

/* ---------- Плавающая кнопка / переключатель тем ---------- */
.float-cta { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: none; box-shadow: var(--glow); }
.theme-switch { position: fixed; left: 14px; bottom: 14px; z-index: 300; display: flex; flex-wrap: wrap; max-width: 460px; gap: 6px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 18px; padding: 5px; }
.theme-switch button { border: 0; border-radius: 99px; padding: 7px 13px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; background: transparent; color: var(--muted); cursor: pointer; transition: all 0.2s var(--ease); }
.theme-switch button.on { background: var(--accent); color: var(--accent-ink); }
.theme-switch .ts-note { position: absolute; bottom: calc(100% + 6px); left: 0; font-family: var(--font-mono); font-size: 9.5px; color: var(--faint); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Хлебные крошки / подзаголовок страницы ---------- */
.page-head { padding: 56px 0 44px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.crumbs { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 18px; display: flex; gap: 8px; }
.crumbs a:hover { color: var(--accent); }
.page-head h1 { font-size: clamp(32px, 4.6vw, 58px); }
.page-head .lead { max-width: 64ch; color: var(--muted); margin-top: 16px; }

/* ---------- Полоса «опасности» для темы hazard ---------- */
.hazard-stripe { height: 8px; background: repeating-linear-gradient(45deg, var(--accent) 0 14px, var(--bg) 14px 28px); }
html:not([data-theme="hazard"]) .hazard-stripe { display: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .hero-in { grid-template-columns: 1fr; gap: 40px; padding: 56px 0; }
  .prod-grid, .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .steps, .process-strip { grid-template-columns: repeat(2, 1fr); }
  .process-strip li:nth-child(3) { border-left: 0; }
  .process-strip li { border-top: 1px solid var(--line); }
  .process-strip li:nth-child(-n+2) { border-top: 0; }
  .process-strip li::after { display: none; }
  .contacts-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-cell { border-top: 1px solid var(--line); }
  .contact-cell:nth-child(-n+2) { border-top: 0; }
  .contact-cell:nth-child(even) { border-left: 1px solid var(--line); }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .section { padding: 56px 0; }
  .nav, .header-phone { display: none; }
  .burger { display: block; margin-left: auto; }
  .header .btn { display: none; }
  .nav.open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px var(--pad) 18px; gap: 2px;
  }
  .prod-grid, .cat-grid, .card-grid, .steps, .works-grid, .form-row { grid-template-columns: 1fr; }
  .card-grid.cols-2 { grid-template-columns: 1fr; }
  .cat-card.wide { grid-column: span 1; }
  .process-strip { grid-template-columns: 1fr; }
  .process-strip li { border-left: 0; border-top: 1px solid var(--line); }
  .process-strip li:first-child { border-top: 0; }
  .cta-block { grid-template-columns: 1fr; gap: 28px; }
  .contacts-grid { grid-template-columns: 1fr; }
  .contact-cell { border-left: 0 !important; border-top: 1px solid var(--line); }
  .contact-cell:first-child { border-top: 0; }
  .hero-facts { flex-direction: column; }
  .hero-facts li { border-left: 0; border-top: 1px solid var(--line); }
  .hero-facts li:first-child { border-top: 0; }
  .float-cta { display: inline-flex; left: 18px; right: auto; bottom: 18px; }
  .cat-anchor-nav { top: 64px; overflow-x: auto; flex-wrap: nowrap; }
  .price-table { display: block; overflow-x: auto; }
}

/* ============================================================
   ФОТО-ОФОРМЛЕНИЕ (добавлено поверх базовых стилей —
   правила ниже переопределяют более ранние при равной специфичности)
   ============================================================ */

/* Hero: фоновое фото цеха с градиентом в цвет темы */
.hero-photo {
  position: absolute; inset: 0; pointer-events: none;
  background: url("../img/hero-laser.jpg") center 32% / cover no-repeat;
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg,
    var(--bg) 20%,
    color-mix(in srgb, var(--bg) 78%, transparent) 52%,
    color-mix(in srgb, var(--bg) 38%, transparent) 100%);
}

/* Полоса процессов: фото вместо иконки */
.p-photo {
  margin: 12px 0 14px; border: 1px solid var(--line); border-radius: var(--r-xs);
  overflow: hidden; aspect-ratio: 16 / 9; background: var(--panel-2);
}
.p-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.process-strip li:hover .p-photo img { transform: scale(1.05); }

/* Плитка категорий на главной: фото сверху */
.cat-card { padding: 0; gap: 0; min-height: 0; }
.cat-photo { display: block; aspect-ratio: 16 / 7; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.cat-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.cat-card:hover .cat-photo img { transform: scale(1.06); }
.cat-info { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.cat-card h3 { margin-top: 0; }

/* Портфолио: реальные фото */
.work .work-img { overflow: hidden; padding: 0; }
.work .work-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.work:hover .work-img img { transform: scale(1.05); }

/* Каталог: баннер категории с фото */
.cat-banner {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-sm);
  overflow: hidden; margin-bottom: 22px; min-height: 190px; display: flex; align-items: flex-end;
}
.cat-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--bg) 92%, transparent) 0%,
    color-mix(in srgb, var(--bg) 58%, transparent) 45%,
    transparent 78%);
}
.cat-banner-in { position: relative; z-index: 2; display: flex; align-items: baseline; gap: 14px; padding: 26px 28px; flex-wrap: wrap; }
.cat-banner-in h2 { font-size: clamp(24px, 3vw, 40px); }
.cat-banner-in .cnt { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.cat-banner-in .icon-lg { color: var(--accent); align-self: center; }

/* Карточки товаров: фото-позиции + «чертёжные» заглушки */
.prod-thumb {
  background:
    repeating-linear-gradient(0deg, transparent 0 19px, var(--line) 19px 20px),
    repeating-linear-gradient(90deg, transparent 0 19px, var(--line) 19px 20px),
    var(--panel-2);
}
.prod-thumb.has-photo { display: block; background: var(--panel-2); overflow: hidden; }
.prod-thumb.has-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.prod-card:hover .prod-thumb.has-photo img { transform: scale(1.06); }

/* Услуги: фото рядом с заголовком услуги */
.svc-photo { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 16 / 8; background: var(--panel-2); }
.svc-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
