/* ==========================================================================
   Badis / Вариант 3 "Производство"
   Направление: швейцарская сетка. Строгая типографика, чёрный на бумаге,
   один сигнальный акцент - красный. Линейки только там, где они
   организуют реальный контент (таблица этапов, шапка, подвал).
   Шрифт: Golos Text - гротеск с полноценной кириллицей.
   Радиусы: 0 по всей странице.
   Дизайн-диалы: variance 5 / motion 4 / density 6.
   ========================================================================== */

:root {
  --paper:   #FAFAF8;
  --paper-2: #EFEEEA;
  --ink:     #0E0E0E;
  --grey:    #6A6A66;
  --red:     #D01C12;   /* единственный акцент; белый текст на нём 5.4:1 */
  --red-ink: #FFFFFF;
  --rule:    #D6D5D0;
  --field:   #FFFFFF;

  --shell: 1400px;
  --gutter: clamp(20px, 3.6vw, 52px);
  --radius: 0px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Golos Text', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #101010;
    --paper-2: #191918;
    --ink:     #F2F1EE;
    --grey:    #9A9A95;
    --red:     #F04438;
    --red-ink: #180402;
    --rule:    #2C2C2A;
    --field:   #171716;
  }
}

*, *::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(--paper); color: var(--ink);
  font-family: var(--font); font-size: 16.5px; line-height: 1.55;
  -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 { margin: 0; font-weight: 700; letter-spacing: -0.032em; line-height: 1.02; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--red); 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(--ink); color: var(--paper); padding: 12px 18px; }
.skip:focus { left: 12px; top: 12px; }

.label {
  font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--grey);
}

[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s 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: 9px;
  white-space: nowrap; padding: 14px 24px;
  border: 1.5px solid transparent; border-radius: var(--radius);
  font: inherit; font-size: 15.5px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background-color .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease), transform .14s var(--ease);
}
.btn--primary { background: var(--red); color: var(--red-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--red) 84%, #000); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--red); color: var(--red-ink); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.btn--onred { background: var(--red-ink); color: var(--red); }
.btn--onred:hover { background: color-mix(in srgb, var(--red-ink) 88%, #000); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn--sm { padding: 10px 18px; font-size: 14.5px; }

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

.head { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1.5px solid var(--ink); }
.head__row { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.045em; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav .btn { display: none; }
/* .nav a задаёт приглушённый цвет ссылок; кнопке нужен собственный */
.nav a.btn--primary { color: var(--red-ink); }
.nav a { text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--grey); transition: color .2s var(--ease); }
.nav a:hover { color: var(--ink); }
.head__cta { display: flex; align-items: center; gap: 14px; }
.head__tel { text-decoration: none; font-size: 14.5px; font-weight: 600; }

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

@media (max-width: 899px) {
  .burger { display: inline-flex; }
  .head__cta .btn, .head__tel { display: none; }
  .nav { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1.5px solid var(--ink); padding: 4px var(--gutter) 24px;
    opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity .22s var(--ease), transform .22s 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(--ink); font-size: 17px; }
  .nav .btn { display: inline-flex; margin-top: 18px; }
}

/* --- герой --------------------------------------------------------------- */

.hero { padding-top: clamp(34px, 4vw, 56px); padding-bottom: 0; }
.hero h1 {
  font-size: clamp(1.95rem, 6.1vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  margin-bottom: clamp(26px, 3.5vw, 44px);
  max-width: 17ch;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero__row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 3vw, 44px);
  border-top: 1.5px solid var(--ink);
  padding-top: 26px;
  padding-bottom: clamp(40px, 5vw, 64px);
}
.hero__sub { font-size: clamp(1rem, 1.2vw, 1.14rem); color: var(--grey); margin-bottom: 26px; max-width: 34ch; }
.hero__media { height: clamp(240px, 42vh, 420px); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 899px) { .hero__row { grid-template-columns: 1fr; } .hero__media { height: 260px; } }

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

.trust { border-top: 1.5px solid var(--ink); }
.trust__row { display: flex; align-items: center; gap: clamp(24px, 5vw, 56px); flex-wrap: wrap; padding: 22px 0; }
.trust__logos { display: flex; align-items: center; gap: clamp(26px, 4vw, 48px); }
.trust__logos svg { height: 24px; width: auto; color: var(--ink); }

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

.section { padding: clamp(64px, 8vw, 110px) 0; }
.h2 { font-size: clamp(1.8rem, 3.4vw, 3rem); }

/* блок 3D: красный полноширинный блок */
.threed { background: var(--red); color: var(--red-ink); }
.threed__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(30px, 4vw, 64px); align-items: center; }
.threed h2 { margin-bottom: 22px; max-width: 15ch; }
.threed p.lead { font-size: clamp(1rem, 1.3vw, 1.16rem); max-width: 46ch; color: color-mix(in srgb, var(--red-ink) 88%, transparent); margin-bottom: 30px; }
.threed__list { display: grid; gap: 10px; margin-bottom: 34px; }
.threed__item { display: flex; gap: 11px; align-items: flex-start; font-size: 15.5px; }
.threed__item svg { flex: none; margin-top: 3px; }
.threed__media img { width: 100%; }
@media (max-width: 899px) { .threed__grid { grid-template-columns: 1fr; } }

/* --- этапы: строгая таблица ---------------------------------------------- */

.steps__head { display: grid; gap: 14px; margin-bottom: clamp(30px, 4vw, 48px); max-width: 46ch; }
.steps__list { border-bottom: 1.5px solid var(--ink); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(16px, 3vw, 44px);
  border-top: 1.5px solid var(--ink);
  padding: clamp(20px, 2.4vw, 30px) 0;
  align-items: baseline;
}
.row h3 { font-size: clamp(1.15rem, 1.7vw, 1.5rem); letter-spacing: -0.03em; }
.row p { color: var(--grey); font-size: 15.5px; max-width: 56ch; }
.row--now h3 { color: var(--red); }
@media (max-width: 719px) { .row { grid-template-columns: 1fr; gap: 8px; } }

/* --- галерея цеха: асимметричная ----------------------------------------- */

.shots { background: var(--paper-2); }
.shots__head { margin-bottom: clamp(28px, 3.5vw, 44px); max-width: 660px; }
.shots__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.shots__grid figure { margin: 0; overflow: hidden; }
.shots__grid img { width: 100%; height: 100%; object-fit: cover; }
.shot--big { grid-column: span 7; height: clamp(300px, 46vw, 560px); }
.shot--small { grid-column: span 5; height: clamp(148px, 22.4vw, 273px); }
@media (max-width: 767px) {
  .shot--big { grid-column: span 12; height: 260px; }
  .shot--small { grid-column: span 6; height: 170px; }
}

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

.cta { border-top: 1.5px solid var(--ink); }
.cta__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 72px); }
.cta h2 { margin-bottom: 18px; }
.cta__lead { color: var(--grey); margin-bottom: 32px; max-width: 38ch; }
.contacts { display: grid; gap: 0; }
.contacts div { display: grid; gap: 3px; border-top: 1px solid var(--rule); padding: 15px 0; }
.contacts .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .13em; color: var(--grey); font-weight: 600; }
.contacts .v { font-size: 18px; font-weight: 600; text-decoration: none; }
a.v:hover { color: var(--red); }

.form { background: var(--field); border: 1.5px solid var(--ink); padding: clamp(22px, 3vw, 36px); position: relative; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.field label span { color: var(--grey); font-weight: 500; text-transform: none; letter-spacing: 0; }
.field input, .field textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--rule); border-radius: 0;
  padding: 12px 14px; width: 100%; transition: border-color .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 94px; }
.field input::placeholder, .field textarea::placeholder { color: var(--grey); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field .err { font-size: 13px; color: var(--red); font-weight: 500; }
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
.form__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.form__note { font-size: 13px; color: var(--grey); max-width: 32ch; }
.form__error { grid-column: 1/-1; font-size: 14px; color: var(--red); margin-top: 14px; font-weight: 500; }

.is-sending .btn--primary::after {
  content: ''; width: 13px; height: 13px;
  border: 2px solid color-mix(in srgb, var(--red-ink) 40%, transparent);
  border-top-color: var(--red-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(--field); display: grid; align-content: center; gap: 12px; padding: clamp(22px, 3vw, 36px); }
.success h3 { font-size: 1.5rem; }
.success p { color: var(--grey); }
.success a { color: var(--red); }
.success__mark { width: 38px; height: 38px; color: var(--red); }

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

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

.foot { border-top: 1.5px solid var(--ink); padding: 26px 0; }
.foot__row { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--grey); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--red); }


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

/* якорные ссылки не должны уводить заголовок под липкую шапку */
: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; }
}
