/* ООО «Табур» — стили сайта, версия 7: фирменный стиль брендбука.
   Чёрный #101010, оранжевый #FF6600, белый. Пропорции 70/20/10.
   Шрифты Play (заголовки) и Roboto (текст) хранятся локально, внешних запросов нет. */
@font-face {
  font-family: "Play";
  src: url("../fonts/play-v21-cyrillic_latin-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto-v51-cyrillic_latin-300.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto-v51-cyrillic_latin-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto-v51-cyrillic_latin-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto-v51-cyrillic_latin-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #101010;
  --muted: #5a5a56;
  --accent: #ff6600;        /* фирменный оранжевый */
  --accent-press: #d85400;
  --accent-ui: #ff6600;     /* оранжевый для текста и мелких акцентов на фоне страницы */
  --surface: #f3f2ef;
  --surface-2: #e9e8e4;
  --graphite: #1e1e1c;
  --on-accent: #ffffff;     /* текст на тёмных плашках — не меняется с темой */
  --on-orange: #141414;     /* текст на оранжевых кнопках и плитках */
  --line: #dcdad6;
  --relief: url("../img/relief.svg");

  --step-small: 1rem;
  --step-body: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --step-lead: clamp(1.25rem, 1.05rem + 0.75vw, 1.75rem);
  --step-head: clamp(1.5rem, 0.95rem + 1.5vw, 2rem);
  --step-title: clamp(1.75rem, 2.9vw, 3.25rem);
  --step-giant: clamp(1.9rem, 0.65rem + 4.4vw, 4.75rem);

  --m: clamp(20px, 2.2vw, 32px);
  --gap: 24px;
  --section: clamp(96px, 11vw, 176px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Тёмная тема ---------- */
:root[data-theme="dark"] {
  --paper: #121210;
  --ink: #f0efec;
  --muted: #a3a29c;
  --accent-ui: #ff7a26; /* на тёмном фоне чуть светлее для читаемости */
  --surface: #1d1d1a;
  --surface-2: #252522;
  --graphite: #2b2b27;
  --line: #323230;
  --relief: url("../img/relief-dark.svg");
}
/* Разделы, задуманные тёмными, в тёмной теме остаются тёмными */
:root[data-theme="dark"] .mast__band,
:root[data-theme="dark"] .wall,
:root[data-theme="dark"] .docs,
:root[data-theme="dark"] .jobs,
:root[data-theme="dark"] .foot,
:root[data-theme="dark"] .menu__list { background: #070707; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--step-body)/1.5 "Roboto", system-ui, sans-serif;
  transition: background-color .25s ease, color .25s ease;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--on-orange); }
:focus-visible { outline: 3px solid var(--accent-ui); outline-offset: 3px; }
.docs :focus-visible, .foot :focus-visible, .jobs :focus-visible, .bar--over :focus-visible { outline-color: var(--on-accent); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 50; }
.skip:focus { top: 12px; }

/* Сетка с осью на 42%: колонки 1–5 — заметки, с 6-й — основной текст */
.axis-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }

/* Кнопки: плоские, прямоугольные, фирменный оранжевый */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: 0;
  background: var(--accent); color: var(--on-orange);
  font: 700 var(--step-small)/1.1 "Play", sans-serif; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { background: var(--accent-press); color: var(--on-accent); }
.btn:active { transform: scale(.97); }
.btn--small { min-height: 44px; padding: 0 18px; }
.btn--paper { background: var(--paper); color: var(--ink); }
.btn--paper:hover { background: var(--accent); color: var(--on-orange); }
.btn--big { min-height: 56px; padding: 0 32px; font-size: var(--step-body); }
.link-arrow { display: inline-flex; align-items: center; min-height: 48px; font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.link-arrow::after { content: "→"; margin-left: 10px; transition: transform .2s var(--ease); }
.link-arrow:hover { color: var(--accent-ui); }
.link-arrow:hover::after { transform: translateX(4px); }

/* Кнопка переключения темы: круглая, с иконками солнца и луны */
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; padding: 0;
  border: 1.5px solid currentColor; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.theme-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-orange); }
.theme-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn__sun { display: none; }
:root[data-theme="dark"] .theme-btn__sun { display: block; }
:root[data-theme="dark"] .theme-btn__moon { display: none; }

/* Пиксель-счётчик для браузеров без JavaScript */
.ym-pixel { position: absolute; left: -9999px; top: 0; }

.h-sec { font-family: "Play", sans-serif; font-size: var(--step-head); font-weight: 700; line-height: 1; letter-spacing: -0.01em; text-transform: uppercase; }

/* ---------- Навигация ---------- */
.bar { display: flex; align-items: center; gap: 28px; font-size: var(--step-small); }
.bar__mark { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; margin-right: auto; }
.bar__word { font-family: "Play", sans-serif; font-weight: 700; font-size: var(--step-lead); letter-spacing: .04em; color: var(--accent-ui); }
.bar__word span { color: inherit; }
:root[data-theme="dark"] .bar__word { color: var(--ink); }
/* Эмблема-капля: цвет знака берётся из currentColor (чёрный на светлом, белый на тёмном) */
.bar__logo { width: 44px; height: 44px; flex: none; color: var(--ink); }
.bar--over .bar__logo { width: 52px; height: 52px; color: #ffffff; }
.bar__nav { display: flex; gap: 26px; }
.bar__nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; position: relative; }
.bar__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.bar__nav a:hover::after, .bar__nav a:focus-visible::after, .bar__nav a.is-active::after { transform: scaleX(1); }
.bar__nav a.is-active { color: var(--accent-ui); }

.bar--over { position: absolute; left: 0; right: 0; top: 0; z-index: 3; padding: 20px var(--m); color: var(--on-accent); }
.bar--over .bar__word { color: var(--on-accent); }

.topbar { display: none; }
.js .topbar {
  display: flex; position: fixed; left: 0; right: 0; top: 0; z-index: 40;
  padding: 10px var(--m); background: var(--paper);
  transform: translateY(-110%); transition: transform .3s var(--ease);
}
.js .topbar.is-on { transform: none; }
main > section { scroll-margin-top: 72px; }

/* Полоса прогресса чтения (создаётся из site.js) */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 90; pointer-events: none; }
.scroll-progress i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
@media print { .scroll-progress { display: none; } }

/* Меню на телефоне (работает и без JS) */
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.menu summary::-webkit-details-marker { display: none; }
.menu__list { position: absolute; right: 0; top: calc(100% + 8px); display: grid; min-width: 220px; padding: 8px 0; background: var(--ink); z-index: 60; }
.menu__list a { color: var(--on-accent); text-decoration: none; padding: 12px 20px; min-height: 44px; }
.menu__list a:hover, .menu__list a:focus-visible { background: var(--graphite); }

/* ---------- Первый экран ---------- */
.mast__band { position: relative; height: 58vh; height: 58svh; min-height: 380px; background: var(--ink); overflow: hidden; }
.mast__fade img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 55%; opacity: 0; transition: opacity 1.6s ease;
}
.mast__fade img:first-child { opacity: 1; }
.js .mast__fade img { opacity: 0; }
.js .mast__fade img.is-on { opacity: 1; }
/* нейтральное затемнение под панелью навигации, чтобы белый текст читался на небе */
.mast__band::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 120px; z-index: 1; background: linear-gradient(rgba(0,0,0,.42), rgba(0,0,0,0)); } /* taste-skill-ignore: нейтральный скрим под текстом на фото */

.mast__body {
  padding: clamp(40px, 5vw, 72px) var(--m) clamp(72px, 7vw, 112px); align-items: start;
  background: var(--relief) no-repeat right bottom / min(46vw, 640px) auto;
}
.mast__notes { grid-column: 1 / 5; display: grid; gap: 6px; padding-top: .6em; font-size: var(--step-small); color: var(--muted); }
.mast__notes li:first-child { color: var(--ink); font-weight: 700; font-family: "Play", sans-serif; letter-spacing: .03em; }
.mast__main { grid-column: 6 / -1; display: grid; gap: 28px; justify-items: start; }
.mast__title { font-family: "Play", sans-serif; font-size: var(--step-title); font-weight: 700; line-height: .95; letter-spacing: -0.01em; text-transform: uppercase; }
.mast__lead { font-size: var(--step-lead); line-height: 1.35; max-width: 30em; font-weight: 300; }
.mast__actions { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }

/* ---------- О компании ---------- */
.about { padding: var(--section) var(--m); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
.about > .h-sec, .about__lead { grid-column: 6 / -1; }
.about__lead { margin-top: 24px; font-size: var(--step-lead); line-height: 1.35; max-width: 30em; font-weight: 300; }
.about__mosaic { grid-column: 1 / -1; margin-top: 72px; }
.about__side { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.about__tile { background: var(--ink); padding: 28px; display: grid; place-items: center; }
.drill { width: 100%; max-width: 300px; height: auto; }
.drill__bore, .drill__bit { transform-box: view-box; }
.js .drill__bore { transform: scaleY(var(--drill, 0)); }
.js .drill__bit { transform: translateY(calc(var(--drill, 0) * 510px)); }
.about__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; font-size: var(--step-small); }
.about__facts dt { color: var(--muted); }
.about__facts dd { font-weight: 500; }

/* ---------- Направления ---------- */
.work { padding: 0 var(--m) var(--section); }
.work__title { grid-column: 6 / -1; }
.work__row { margin-top: clamp(72px, 8vw, 120px); align-items: start; }
.work__body { grid-column: 6 / 12; grid-row: 1; }
.work__body h3 { font-family: "Play", sans-serif; font-size: var(--step-lead); font-weight: 700; line-height: 1.1; letter-spacing: 0; margin-bottom: 14px; }
.work__body h3::before { content: ""; display: block; width: 42px; height: 4px; background: var(--accent); margin-bottom: 16px; }
.work__body p { max-width: 34ch; }
.work__pic { grid-column: 1 / 5; grid-row: 1; justify-self: start; object-fit: cover; }
.work__pic--a { width: min(100%, 300px); aspect-ratio: 4 / 5; }
.work__pic--b { width: min(100%, 400px); aspect-ratio: 3 / 2; }

/* ---------- Чёрная страница: плитки ---------- */
.wall { background: var(--ink); padding: var(--m); }
.wall__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile { position: relative; aspect-ratio: 1; container-type: inline-size; display: grid; place-items: center; overflow: hidden; }
.tile__word { font-family: "Play", sans-serif; font-size: 8.5cqi; font-weight: 700; line-height: 1; letter-spacing: 0; text-transform: uppercase; }
.tile__cap { position: absolute; left: 12px; right: 12px; bottom: 18px; text-align: center; font-size: var(--step-small); }
.tile--accent { background: var(--accent); color: var(--on-orange); }
.tile--paper { background: var(--paper); color: var(--ink); }
.tile--grey { background: var(--graphite); color: var(--on-accent); }
.tile--photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tile--photo:hover img { transform: scale(1.04); }

/* ---------- Чёрная страница: документы ---------- */
.docs { background: var(--ink); color: var(--on-accent); padding: var(--section) var(--m); align-items: start; }
.docs__list { grid-column: 1 / 5; display: grid; gap: 14px; padding-top: .6em; font-size: var(--step-body); font-weight: 500; }
.docs__list li { border-left: 3px solid var(--accent); padding-left: 14px; }
.docs__main { grid-column: 6 / -1; display: grid; gap: 28px; justify-items: start; }
.docs__main p { font-size: var(--step-lead); line-height: 1.35; max-width: 26em; font-weight: 300; }
.docs .btn--paper { background: var(--accent); color: var(--on-orange); }
.docs .btn--paper:hover { background: #f5f5f2; color: #101010; }

/* ---------- Чёрная страница: вакансии ---------- */
.jobs {
  background: var(--ink); color: var(--on-accent); min-height: 80vh; min-height: 80svh;
  padding: var(--section) var(--m) 48px;
  display: grid; grid-template-rows: 1fr auto; gap: 64px;
}
.jobs__title { font-family: "Play", sans-serif; font-size: var(--step-title); font-weight: 700; line-height: .95; letter-spacing: -0.01em; text-transform: uppercase; }
.jobs__foot { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; }
.jobs__foot p { grid-column: 1 / 7; max-width: 40ch; font-weight: 300; }
.jobs__foot p a { text-underline-offset: 4px; color: var(--accent-ui); }
.jobs__foot .btn { grid-column: 10 / -1; justify-self: end; }

/* ---------- Реквизиты ---------- */
.reqs { padding: var(--section) var(--m) 0; }
.reqs__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.reqs__title span { color: var(--muted); }
.reqs__copy { display: grid; justify-items: end; gap: 8px; }
.reqs__note { min-height: 1.5em; font-size: var(--step-small); color: var(--accent-ui); }
.reqs__bands { margin-top: 56px; display: grid; gap: 4px; }
.reqs__bands > div { display: grid; grid-template-columns: 28% 1fr; gap: 16px; align-items: center; min-height: 72px; padding: 14px 24px; background: var(--surface); }
.reqs__bands > div:nth-child(even) { background: var(--surface-2); }
.reqs__bands dt { color: var(--muted); font-size: var(--step-small); }
.reqs__bands dd { font-variant-numeric: tabular-nums; font-weight: 500; }

/* ---------- Контакты ---------- */
.contact {
  padding: var(--section) var(--m) 120px; align-items: start;
  background: var(--relief) no-repeat left -60px bottom -80px / min(50vw, 680px) auto;
}
.contact__say { grid-column: 1 / 6; display: grid; gap: 20px; }
.contact__say p { font-size: var(--step-lead); line-height: 1.3; font-weight: 300; }
.contact__pic { grid-column: 7 / 9; width: 100%; max-width: 170px; aspect-ratio: 1; object-fit: cover; justify-self: center; }
.contact__links { grid-column: 9 / -1; display: grid; gap: 12px; justify-items: start; padding-top: 8px; }
.contact__links a { font-size: var(--step-body); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.contact__links a:hover { color: var(--accent-ui); }
.contact__meta { margin-top: 8px; font-size: var(--step-small); color: var(--muted); }

/* ---------- Подвал: чёрное поле, телефон оранжевым ---------- */
.foot {
  min-height: 70vh; min-height: 70svh; background: var(--ink); color: var(--on-accent);
  display: grid; grid-template-rows: auto 1fr auto auto; padding: 40px var(--m) 28px;
}
.foot > * { min-width: 0; }
.foot__top { display: flex; gap: 48px; font-size: var(--step-small); align-items: start; }
.foot__up { margin-left: auto; }
.foot__phone {
  grid-row: 3; align-self: end; text-decoration: none; white-space: nowrap;
  font-family: "Play", sans-serif; font-weight: 700; color: var(--accent);
  font-size: var(--step-title); line-height: .95; letter-spacing: 0;
  font-variant-numeric: tabular-nums; margin-bottom: 40px;
}
.foot__phone:hover { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 10px; }
.foot__meta { grid-row: 4; display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; font-size: var(--step-small); color: var(--muted); }
.foot__meta a { color: var(--on-accent); }
.foot__meta span:last-child { text-align: right; }

/* ---------- Появление при прокрутке ---------- */
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-rise].is-in { opacity: 1; transform: none; }
[data-drift] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { transition: none; }
  .js [data-rise] { opacity: 1; transform: none; transition: none; }
  .btn, .theme-btn, .bar__nav a::after, .js .topbar, .mast__fade img, .tile--photo img, .link-arrow::after { transition: none; }
  [data-drift] { transform: none !important; }
}

/* ---------- Планшет ---------- */
@media (max-width: 1024px) {
  .bar__nav { gap: 16px; }
  .work__body { grid-column: 6 / -1; }
  .work__pic { grid-column: 1 / 5; }
  .contact__say { grid-column: 1 / 7; }
  .contact__pic { grid-column: 7 / 9; }
  .contact__links { grid-column: 9 / -1; }
}

/* ---------- Телефон: ось уходит к левому полю ---------- */
@media (max-width: 720px) {
  .bar { gap: 12px; }
  .bar__nav { display: none; }
  .menu { display: block; }
  .bar--over { padding: 14px var(--m); }
  .bar__logo { width: 38px; height: 38px; }
  .bar--over .bar__logo { width: 44px; height: 44px; }
  .bar__mark { gap: 10px; }
  .bar__word { font-size: var(--step-body); }

  .mast__band { height: 46vh; height: 46svh; min-height: 300px; }
  .mast__fade img { object-position: 50% 55%; }
  .mast__notes, .mast__main { grid-column: 1 / -1; }
  .mast__notes { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 0; margin-top: 32px; order: 2; }
  .mast__actions .btn { width: 100%; }

  .about > .h-sec, .about__lead { grid-column: 1 / -1; }
  .about__mosaic { margin-top: 40px; }
  .about__side { grid-template-columns: 1fr; }

  .work__title, .work__body { grid-column: 1 / -1; }
  .work__row { margin-top: 64px; }
  .work__pic { grid-column: 1 / -1; grid-row: 2; margin-top: 24px; justify-self: start; }
  .work__pic--a { width: 70%; justify-self: end; }
  .work__pic--b { width: 100%; }

  .wall__grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .tile__cap { bottom: 12px; }

  .docs__list, .docs__main { grid-column: 1 / -1; }
  .docs__list { order: 2; margin-top: 40px; }

  .jobs { min-height: 70vh; min-height: 70svh; gap: 48px; }
  .jobs__foot p, .jobs__foot .btn { grid-column: 1 / -1; }
  .jobs__foot .btn { width: 100%; margin-top: 28px; }

  .reqs__copy { justify-items: start; }
  .reqs__bands > div { grid-template-columns: 1fr; gap: 2px; padding: 14px 16px; }

  .contact__say { grid-column: 1 / -1; }
  .contact__pic { grid-column: 1 / 4; max-width: 96px; justify-self: start; margin-top: 32px; }
  .contact__links { grid-column: 4 / -1; margin-top: 32px; padding-top: 0; }

  .foot__top { flex-wrap: wrap; gap: 16px 32px; }
  .foot__meta { grid-template-columns: 1fr; }
  .foot__meta span:last-child { text-align: left; }
}

/* Адрес почты не переносится по дефису */
a[href^="mailto:"] { white-space: nowrap; }

/* ==========================================================
   Версия 8: «карточный» стиль (референс Dribbble 27789968).
   Скруглённые блоки с мягкими тенями, парящая панель,
   кнопки-пилюли; фон страницы — 3D-буквы «ТаБур» по диагонали.
   Палитра (чёрный/оранжевый #FF6600/белый) и шрифты Play/Roboto
   сохранены по брендбуку.
   ========================================================== */
:root {
  --canvas: #f1f0ec;             /* фон страницы между карточками */
  --radius: 22px;
  --radius-lg: 30px;
  --shadow: 0 12px 32px rgba(16, 16, 16, .09), 0 2px 8px rgba(16, 16, 16, .05);
  --shadow-soft: 0 6px 18px rgba(16, 16, 16, .07), 0 1px 4px rgba(16, 16, 16, .04);
}
:root[data-theme="dark"] {
  --canvas: #0b0b0a;
  --shadow: 0 12px 32px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, .40), 0 1px 4px rgba(0, 0, 0, .30);
}
body { background: var(--canvas); }

/* --- Фоновые 3D-буквы «ТаБур» по диагонали --- */
.bgword {
  position: fixed; inset: -30% -25%; z-index: -1;
  display: grid; align-content: space-evenly;
  transform: rotate(-14deg);
  pointer-events: none; user-select: none;
  font: 700 clamp(90px, 12.5vw, 210px)/1.35 "Play", sans-serif;
  letter-spacing: .06em; white-space: nowrap;
  color: rgba(16, 16, 16, .08);            /* фирменный чёрный #101010 */
  text-shadow:
    1px 1px 0 rgba(16, 16, 16, .070),
    2px 2px 0 rgba(16, 16, 16, .060),
    3px 3px 0 rgba(16, 16, 16, .050),
    4px 4px 0 rgba(16, 16, 16, .040),
    5px 5px 0 rgba(16, 16, 16, .030),
    6px 6px 0 rgba(255, 102, 0, .10),      /* фирменный оранжевый уклон */
    9px 9px 0 rgba(255, 102, 0, .08);
}
.bgword span { display: block; }
.bgword span:nth-child(even) {
  color: rgba(255, 102, 0, .12);           /* фирменный оранжевый #FF6600 */
  text-shadow:
    1px 1px 0 rgba(255, 102, 0, .100),
    2px 2px 0 rgba(255, 102, 0, .085),
    3px 3px 0 rgba(255, 102, 0, .070),
    4px 4px 0 rgba(255, 102, 0, .055),
    5px 5px 0 rgba(255, 102, 0, .040),
    6px 6px 0 rgba(16, 16, 16, .10),       /* чёрная грань */
    9px 9px 0 rgba(16, 16, 16, .08);
}
:root[data-theme="dark"] .bgword {
  color: rgba(245, 245, 242, .08);         /* белый по брендбуку */
  text-shadow:
    1px 1px 0 rgba(245, 245, 242, .070),
    2px 2px 0 rgba(245, 245, 242, .060),
    3px 3px 0 rgba(245, 245, 242, .050),
    4px 4px 0 rgba(245, 245, 242, .040),
    5px 5px 0 rgba(245, 245, 242, .030),
    6px 6px 0 rgba(255, 102, 0, .12),
    9px 9px 0 rgba(255, 102, 0, .10);
}
:root[data-theme="dark"] .bgword span:nth-child(even) {
  color: rgba(255, 102, 0, .14);
  text-shadow:
    1px 1px 0 rgba(255, 102, 0, .120),
    2px 2px 0 rgba(255, 102, 0, .100),
    3px 3px 0 rgba(255, 102, 0, .080),
    4px 4px 0 rgba(255, 102, 0, .060),
    5px 5px 0 rgba(255, 102, 0, .045),
    6px 6px 0 rgba(0, 0, 0, .35),
    9px 9px 0 rgba(0, 0, 0, .30);
}
@media print { .bgword { display: none; } }

/* --- Кнопки-пилюли --- */
.btn { border-radius: 999px; box-shadow: var(--shadow-soft); }
.btn:hover { box-shadow: var(--shadow); }

/* --- Парящая панель навигации --- */
.js .topbar { left: var(--m); right: var(--m); top: 12px; border-radius: 999px; box-shadow: var(--shadow); padding-left: 20px; padding-right: 20px; }
.menu__list { border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }

/* --- Первый экран: фото и заголовок — карточки --- */
.mast__band { border-radius: var(--radius-lg); margin: 12px var(--m) 0; box-shadow: var(--shadow); }
.mast__body {
  background: var(--relief) no-repeat right bottom / min(46vw, 640px) auto, var(--paper);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  margin: 28px var(--m) 0;
}

/* --- О компании --- */
.about__lead { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 24px 28px; }
.about__tile { border-radius: var(--radius); box-shadow: var(--shadow); }
.about__facts > div { background: var(--paper); border-radius: 14px; box-shadow: var(--shadow-soft); padding: 14px 16px; }

/* --- Направления: текст и фото — карточки --- */
.work__body { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 28px; }
.work__pic { border-radius: var(--radius); box-shadow: var(--shadow); }

/* --- Чёрные разделы — скруглённые карточки с отступом от краёв --- */
.wall { border-radius: var(--radius-lg); margin: 0 var(--m); box-shadow: var(--shadow); }
.tile { border-radius: 16px; }
.docs { border-radius: var(--radius-lg); margin: var(--m) var(--m) 0; box-shadow: var(--shadow); }
.jobs { border-radius: var(--radius-lg); margin: var(--m) var(--m) 0; box-shadow: var(--shadow); min-height: 70vh; min-height: 70svh; }

/* --- Реквизиты --- */
.reqs__bands { gap: 8px; }
.reqs__bands > div { background: var(--paper); border-radius: 14px; box-shadow: var(--shadow-soft); }
.reqs__bands > div:nth-child(even) { background: var(--surface); }

/* --- Контакты --- */
.contact__say p { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 24px 28px; }
.contact__pic { border-radius: var(--radius); box-shadow: var(--shadow); }

/* --- Переключатель языка RU/EN --- */
.bar__lang { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1.5px solid currentColor; border-radius: 999px; font: 700 13px/1 "Play", sans-serif; letter-spacing: .08em; flex: none; }
.bar__lang > * { padding: 6px 10px; border-radius: 999px; }
.bar__lang a { color: inherit; text-decoration: none; opacity: .6; }
.bar__lang a:hover { opacity: 1; background: rgba(128, 128, 128, .18); }
.bar__lang .bar__lang-cur { background: var(--accent); color: var(--on-accent); opacity: 1; }
.bar--over .bar__lang { color: #ffffff; }

/* --- Направления: карточка на всю ширину, когда нет фото --- */
.work__row--wide .work__body { grid-column: 1 / -1; }

/* --- Подвал --- */
.foot { border-radius: var(--radius-lg) var(--radius-lg) 0 0; margin: var(--m) var(--m) 0; box-shadow: var(--shadow); }

/* --- Телефон: компактные отступы карточек --- */
@media (max-width: 1100px) {
  /* на планшетах и компактных ноутбуках навигация — бургером:
     в строке остаются знак, «Разделы», тема, RU/EN и звонок */
  .bar__nav { display: none; }
  .menu { display: block; }
}
@media (max-width: 720px) {
  .mast__body, .work__body, .about__lead, .contact__say p { padding: 20px; }
  .js .topbar { left: 10px; right: 10px; }
  .mast__band { margin-left: 10px; margin-right: 10px; }
  .mast__body, .wall, .docs, .jobs, .foot { margin-left: 10px; margin-right: 10px; }
  .bgword { font-size: 13vw; }
  .bar__lang { font-size: 11px; padding: 2px; }
  .bar__lang > * { padding: 5px 8px; }
  .bar__word { display: none; } /* на телефоне в панели остаётся только знак — место для переключателей */
}

/* ==========================================================
   Версия 9: 3D-объекты (Three.js r160, assets/js/scene3d.js).
   Вращающееся долото на первом экране, объёмная схема скважины
   в «О компании», фоновые частицы. Без WebGL или при отключённой
   анимации всё остаётся как в прежних версиях.
   ========================================================== */
.bg3d { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
@media print { .bg3d { display: none; } }

/* --- Первый экран: карточка с вращающимся долотом --- */
.mast__bit { display: none; grid-column: 1 / 5; grid-row: 1; align-self: end; gap: 10px; }
.mast__body > .mast__notes, .mast__body > .mast__main { grid-row: 1; }
.mast__bit.is-3d { display: grid; }
.mast__bit-card {
  position: relative; aspect-ratio: 4 / 3.1; border-radius: var(--radius);
  background: var(--ink); box-shadow: var(--shadow); overflow: hidden;
}
.mast__bit-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mast__bit-cap { font-size: var(--step-small); color: var(--muted); padding-left: 4px; }

/* --- О компании: объёмная схема скважины (SVG остаётся запасным вариантом) --- */
.about__tile3d { display: none; }
.about__tile.has-3d .drill { display: none; }
.about__tile.has-3d .about__tile3d { display: block; position: relative; width: 100%; max-width: 300px; aspect-ratio: 2 / 3; }
.about__tile3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.strata-legend { display: none; }
.about__tile.has-3d .strata-legend {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px;
  width: 100%; max-width: 300px; margin-top: 18px;
  font-size: 13px; line-height: 1.2; color: var(--paper);
}
.strata-legend li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.strata-legend li:last-child { grid-column: 1 / -1; }
.strata-legend i { width: 12px; height: 12px; flex: none; border-radius: 3px; background: var(--c); border: 1px solid rgba(128, 128, 128, .45); }
/* Цвета пластов — классами, без inline style="--c:...": иначе CSP style-src 'self'
   блокирует атрибуты стиля и квадратики легенды теряют цвет (было на проде с v6). */
.strata-legend li:nth-child(1) i { --c: #e9e8e4; }
.strata-legend li:nth-child(2) i { --c: #b9b8b2; }
.strata-legend li:nth-child(3) i { --c: #57564f; }
.strata-legend li:nth-child(4) i { --c: #ff6600; }

@media (max-width: 720px) {
  .mast__body > .mast__notes, .mast__body > .mast__main { grid-row: auto; }
  .mast__bit { grid-column: 1 / -1; grid-row: auto; order: 1; margin-top: 8px; }
  .mast__bit-card { aspect-ratio: 16 / 10; }
}


/* V8_3D: инженерные режимы, аннотации и деликатное свечение. */
.mast__bit-card { isolation: isolate; }
.mast__bit-card::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 102, 0, .035), transparent 28%, transparent 72%, rgba(0, 0, 0, .20));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  border-radius: inherit;
}
.mast__bit-card canvas { z-index: 1; outline-offset: -3px; }
.mast__bit-card canvas:focus-visible { outline: 2px solid var(--accent); }
.bit3d-toolbar { position: absolute; inset: 0; z-index: 5; pointer-events: none; font-family: "Roboto", sans-serif; }
.bit3d-modes, .bit3d-actions { position: absolute; display: flex; gap: 4px; pointer-events: auto; }
.bit3d-modes { left: 10px; bottom: 10px; padding: 3px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; background: rgba(16, 16, 16, .76); backdrop-filter: blur(10px); }
.bit3d-actions { right: 10px; top: 10px; }
.bit3d-toolbar button {
  min-height: 32px; border: 1px solid rgba(255, 255, 255, .17); border-radius: 7px;
  padding: 6px 9px; background: rgba(16, 16, 16, .72); color: #f5f5f2;
  font: 500 10px/1.1 "Roboto", sans-serif; letter-spacing: .01em; cursor: pointer;
  transition: background-color .18s ease-out, border-color .18s ease-out, color .18s ease-out, transform .18s ease-out;
}
.bit3d-toolbar button:hover { background: rgba(255, 102, 0, .20); border-color: rgba(255, 102, 0, .75); }
.bit3d-toolbar button:active { transform: scale(.96); }
.bit3d-toolbar button:focus-visible { outline: 2px solid #f5f5f2; outline-offset: 2px; }
.bit3d-toolbar button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bit3d-status {
  position: absolute; z-index: 4; left: 12px; top: 13px; pointer-events: none;
  color: rgba(245, 245, 242, .68); font: 500 9px/1 "Roboto", sans-serif; letter-spacing: .13em;
}
.bit3d-status::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px rgba(255, 102, 0, .85); }
.bit3d-label {
  position: absolute; z-index: 4; width: max-content; max-width: 156px; pointer-events: none;
  transform: translate(-50%, -50%); padding: 7px 9px; border: 1px solid rgba(255, 102, 0, .48);
  border-radius: 6px; background: rgba(16, 16, 16, .88); box-shadow: 0 0 18px rgba(255, 102, 0, .12);
  color: #f5f5f2; font-family: "Roboto", sans-serif; backdrop-filter: blur(7px);
}
.bit3d-label::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 16px; background: rgba(255, 102, 0, .62); }
.bit3d-label strong, .bit3d-label small { display: block; }
.bit3d-label strong { font-size: 10px; line-height: 1.25; font-weight: 500; }
.bit3d-label small { margin-top: 3px; color: rgba(245, 245, 242, .65); font-size: 8px; line-height: 1.3; }
.mast__bit-card[data-mode="blue"] .bit3d-label, .mast__bit-card[data-mode="xray"] .bit3d-label { border-color: rgba(255, 139, 66, .70); }
@media (max-width: 720px) {
  .bit3d-modes { left: 8px; right: 8px; bottom: 8px; }
  .bit3d-modes button { flex: 1; min-height: 44px; }
  .bit3d-actions { right: 8px; top: 8px; }
  .bit3d-actions button { min-height: 40px; padding-left: 8px; padding-right: 8px; }
  .bit3d-status { left: 10px; top: 14px; }
  .bit3d-label { max-width: 112px; padding: 6px 7px; }
  .bit3d-label small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bit3d-toolbar button { transition: none; } }
@media print { .bit3d-toolbar, .bit3d-status, .bit3d-label { display: none !important; } }


/* Производительность: браузер пропускает отрисовку разделов вне экрана
   (content-visibility), полоса прокрутки не дёргается за счёт
   contain-intrinsic-size: auto — после первого показа помнится реальная высота. */
.about, .work, .wall, .docs, .jobs, .reqs, .contact, .foot {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}
