/* ==========================================================================
   Badis / Вариант 2 "Цифровой цех"
   Направление: dark tech. Почти чёрный фон, один акцент - зелёный
   (взят из рендера wireframe), моноширинный для технических подписей.
   Шрифты: Unbounded (дисплей) / Manrope (текст) / JetBrains Mono (метки).
   Радиусы: 4px по всей странице.
   Тема: страница зафиксирована в тёмной - это и есть айдентика варианта,
   поэтому светлого режима нет намеренно (color-scheme: dark).
   Дизайн-диалы: variance 8 / motion 7 / density 5.
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg:      #0B0C0C;
  --surface: #131515;
  --surface-2: #191C1B;
  --text:    #E9EBE8;
  --muted:   #8E948F;
  --accent:  #46D45A;
  --accent-ink: #06210C;   /* текст на акценте, контраст 8.9:1 */
  --rule:    rgba(255, 255, 255, 0.11);

  --shell: 1400px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 4px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-text: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
svg[hidden] { display: none; }
a { color: inherit; }
p { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 12px 18px; }
.skip:focus { left: 12px; top: 12px; }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* --- reveal -------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* --- кнопки -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  white-space: nowrap;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-text);
  font-size: 15.5px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease),
              color .25s var(--ease), transform .15s var(--ease);
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 82%, #fff); }
.btn--ghost { border-color: var(--rule); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn--sm { padding: 10px 18px; font-size: 14.5px; }

/* --- шапка --------------------------------------------------------------- */

.head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}
.head__row { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.02em;
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav .btn { display: none; }
/* .nav a задаёт приглушённый цвет ссылок; кнопке нужен собственный */
.nav a.btn--primary { color: var(--accent-ink); }
.nav a { text-decoration: none; font-size: 14.5px; color: var(--muted); transition: color .2s var(--ease); }
.nav a:hover { color: var(--text); }
.head__cta { display: flex; align-items: center; gap: 14px; }
.head__tel { text-decoration: none; font-family: var(--font-mono); font-size: 13.5px; color: var(--muted); }
.head__tel:hover { color: var(--text); }

.burger { display: none; width: 42px; height: 42px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--rule); border-radius: var(--radius); cursor: pointer; color: var(--text); }
.burger span { display: block; width: 17px; height: 1.5px; background: currentColor; position: relative; }
.burger span::before, .burger span::after { content: ''; position: absolute; left: 0; width: 17px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.burger span::before { top: -5.5px; } .burger span::after { top: 5.5px; }
.nav-open .burger span { background: transparent; }
.nav-open .burger span::before { transform: translateY(5.5px) rotate(45deg); }
.nav-open .burger span::after { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 899px) {
  .burger { display: inline-flex; }
  .head__cta .btn, .head__tel { display: none; }
  .nav {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--rule);
    padding: 6px var(--gutter) 24px;
    opacity: 0; transform: translateY(-10px); pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav-open .nav { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--text); font-size: 17px; }
  .nav .btn { display: inline-flex; margin-top: 18px; }
}

/* --- герой: полноэкранное медиа ------------------------------------------ */

.hero {
  position: relative;
  min-height: min(760px, calc(100dvh - 70px));
  display: grid;
  align-items: center;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 68% center; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, var(--bg) 6%, color-mix(in srgb, var(--bg) 74%, transparent) 42%, transparent 72%),
    linear-gradient(0deg, var(--bg) 2%, transparent 34%);
}
.hero__inner { position: relative; padding: clamp(56px, 8vw, 96px) 0; }
.hero__copy { max-width: 640px; }
.hero h1 {
  font-size: clamp(1.55rem, 3.4vw, 3.1rem);
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__sub { font-size: clamp(1rem, 1.2vw, 1.13rem); color: var(--muted); max-width: 46ch; margin-bottom: 34px; }
.hero__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

@media (max-width: 899px) {
  .hero { min-height: 0; }
  .hero__bg img { object-position: 62% center; }
  .hero__scrim { background: linear-gradient(0deg, var(--bg) 12%, color-mix(in srgb, var(--bg) 70%, transparent) 60%, color-mix(in srgb, var(--bg) 40%, transparent)); }
  .hero__inner { padding: 46px 0 54px; }
}

/* --- доверие ------------------------------------------------------------- */

.trust { border-block: 1px solid var(--rule); }
.trust__row { display: flex; align-items: center; gap: clamp(26px, 5vw, 60px); flex-wrap: wrap; padding: 24px 0; }
.trust__logos { display: flex; align-items: center; gap: clamp(26px, 4vw, 50px); }
.trust__logos svg { height: 24px; width: auto; color: var(--text); opacity: .72; }

/* --- секции -------------------------------------------------------------- */

.section { padding: clamp(70px, 9vw, 124px) 0; }
.h2 { font-size: clamp(1.7rem, 2.9vw, 2.6rem); }
.lead { color: var(--muted); font-size: clamp(1rem, 1.15vw, 1.08rem); max-width: 56ch; }

/* блок 3D */
.threed__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 4vw, 72px); align-items: center; }
.threed h2 { margin-bottom: 20px; }
.threed .lead { margin-bottom: 30px; }
.threed__media { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.threed__list { display: grid; gap: 12px; }
.threed__item { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; color: var(--text); }
.threed__item svg { flex: none; margin-top: 4px; color: var(--accent); }
@media (max-width: 899px) { .threed__grid { grid-template-columns: 1fr; } }

/* --- процесс: горизонтальная лента с scroll-snap -------------------------- */

.flow__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.flow__head h2 { max-width: 20ch; }
.flow__hint { display: flex; align-items: center; gap: 8px; }

.track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(268px, 340px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding-inline: var(--gutter);
  padding-bottom: 18px;
  margin-inline: calc(-1 * var(--gutter));
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.track::-webkit-scrollbar { height: 6px; }
.track::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 99px; }

.step {
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  display: grid;
  align-content: start;
  gap: 12px;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.step:hover { border-color: color-mix(in srgb, var(--accent) 46%, transparent); background: var(--surface-2); }
.step__icon { width: 30px; height: 30px; color: var(--accent); }
.step h3 { font-size: 1.12rem; font-family: var(--font-text); font-weight: 700; letter-spacing: -0.01em; }
.step p { color: var(--muted); font-size: 14.8px; }

/* --- цех: полноширинная полоса ------------------------------------------- */

.floor { position: relative; overflow: hidden; }
.floor__bg { position: absolute; inset: 0; }
.floor__bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.35) contrast(1.05); }
.floor__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 4%, color-mix(in srgb, var(--bg) 84%, transparent) 56%, color-mix(in srgb, var(--bg) 20%, transparent) 100%),
    linear-gradient(0deg, color-mix(in srgb, var(--bg) 55%, transparent), transparent 40%);
}
.floor__inner { position: relative; padding: clamp(80px, 11vw, 156px) 0; }
.floor__statement {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.45rem, 2.7vw, 2.35rem); line-height: 1.18; letter-spacing: -0.025em;
  max-width: 21ch; margin-bottom: 26px;
}
.floor__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; max-width: 900px; }
.floor__cols p { color: var(--muted); font-size: 15px; }
.floor__cols strong { display: block; color: var(--text); font-weight: 700; margin-bottom: 6px; }

/* --- заявка -------------------------------------------------------------- */

.cta { background: var(--surface); border-top: 1px solid var(--rule); }
.cta__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(34px, 5vw, 76px); }
.cta h2 { margin-bottom: 18px; }
.cta__lead { color: var(--muted); margin-bottom: 32px; max-width: 40ch; }
.contacts { display: grid; gap: 16px; border-top: 1px solid var(--rule); padding-top: 24px; }
.contacts div { display: grid; gap: 3px; }
.contacts .k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.contacts .v { font-size: 17px; text-decoration: none; }
a.v:hover { color: var(--accent); }

.form { background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); position: relative; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 700; }
.field label span { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  font: inherit; font-size: 15.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 12px 14px; width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 92px; }
.field input::placeholder, .field textarea::placeholder { color: #7A807B; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field .err { font-size: 13px; color: #FF7A6B; }
.field.has-error input, .field.has-error textarea { border-color: #FF7A6B; }
.form__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.form__note { font-size: 13px; color: var(--muted); max-width: 32ch; }
.form__error { grid-column: 1/-1; font-size: 14px; color: #FF7A6B; margin-top: 14px; }

.is-sending .btn--primary::after {
  content: ''; width: 13px; height: 13px;
  border: 2px solid color-mix(in srgb, var(--accent-ink) 40%, transparent);
  border-top-color: var(--accent-ink); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .is-sending .btn--primary::after { animation-duration: 2s; } }

.success[hidden] { display: none; }
.success {
  position: absolute; inset: 0; background: var(--bg); border-radius: var(--radius);
  display: grid; align-content: center; gap: 12px; padding: clamp(22px, 3vw, 34px);
}
.success h3 { font-size: 1.4rem; }
.success p { color: var(--muted); }
.success a { color: var(--accent); }
.success__mark { width: 38px; height: 38px; color: var(--accent); }

@media (max-width: 899px) {
  .cta__grid { grid-template-columns: 1fr; }
  .form__grid { grid-template-columns: 1fr; }
}

/* --- подвал -------------------------------------------------------------- */

.foot { border-top: 1px solid var(--rule); padding: 30px 0; }
.foot__row { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent); }


/* --- мобильные правки ---------------------------------------------------- */

/* якорные ссылки не должны уводить заголовок под липкую шапку */
:where(section[id], div[id]) { scroll-margin-top: 92px; }

@media (max-width: 899px) {
  /* высота зоны нажатия не меньше 44px */
  .contacts .v { padding: 8px 0; }
  .foot a { display: inline-block; padding: 8px 0; }
  .brand { padding: 6px 0; }
}
