/* 3DMake — редизайн «Industrial Premium × 3D OS» (графит + оранжевый). Подключается ПОСЛЕДНИМ, после theme.css/toys.css.
   Файл написан вручную (не генерируется); остальные CSS в этой папке — результат make_implementation.py. */

/* ---------- типографика: IBM Plex, локальные файлы ---------- */
:root {
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --cond: var(--sans);
  --ring: 2px solid var(--accent);
}
html, body { font-size: 15.5px; }
h1, h2, h3 { letter-spacing: -.025em; }
h1 { font-weight: 700; }
.tag, .num, .bk, .crumbs, .hud .hl, .hud .hh span, .eyebrow, label.consent small {
  font-family: var(--mono);
}
.tag { font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.num { font-family: var(--mono); font-weight: 500; letter-spacing: .04em; }

/* ---------- доступность: видимый фокус, пропуск ссылок ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: var(--ring); outline-offset: 3px; border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---------- главный экран: закреплённый hero, печать от прокрутки ---------- */
.hero-runway { position: relative; height: 330vh; }
.hero-runway .hero { position: sticky; top: 0; }
.hero-runway.flat { height: auto; }
.hero-runway.flat .hero { position: relative; }
.hero-runway.flat .beats, .hero-runway.flat .scrollhint { display: none; }
@media (max-width: 820px) { .hero-runway { height: 280vh; } }

.hero .copy { transition: opacity .5s ease, transform .6s ease; }
.hero:not([data-beat="0"]) .copy { opacity: 0; pointer-events: none; transform: translateY(-62%); }
@media (max-width: 820px) { .hero:not([data-beat="0"]) .copy { transform: translateY(-24px); } }

.hero .scrollhint { margin: clamp(1.2rem, 2.6vw, 2rem) 0 0; font: 500 .78rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: rgba(217, 221, 230, .7); display: flex; align-items: center; gap: 10px; }
.hero .scrollhint::before { content: ""; width: 1px; height: 28px; background: linear-gradient(180deg, var(--accent), transparent); }

.hero .beats { position: absolute; z-index: 2; left: clamp(20px, 5.2vw, 100px); top: 50%; transform: translateY(-52%); width: min(34vw, 500px); pointer-events: none; }
.hero .beat { position: absolute; left: 0; right: 0; top: 50%; margin: 0; transform: translateY(-46%); opacity: 0; transition: opacity .5s ease, transform .6s ease;
  font: 400 clamp(1rem, 1.35vw, 1.2rem)/1.55 var(--sans); color: rgba(224, 228, 237, .88); }
.hero .beat .bk { display: block; font: 500 .76rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.hero .beat b { display: block; font: 700 clamp(1.8rem, 3.1vw, 3rem)/1.05 var(--sans); letter-spacing: -.035em; color: #fff; margin-bottom: .45em; }
.hero .beat .btn { margin-top: 1.4rem; pointer-events: auto; display: flex; width: fit-content; align-items: center; }
.hero[data-beat="1"] .beat[data-b="1"], .hero[data-beat="2"] .beat[data-b="2"], .hero[data-beat="3"] .beat[data-b="3"] { opacity: 1; transform: translateY(-50%); }
.hero[data-beat="3"] .beat[data-b="3"] { pointer-events: auto; }
@media (max-width: 820px) {
  .hero .beats { left: 20px; right: 20px; width: auto; top: calc(var(--nav-h) + clamp(18px, 4vh, 40px)); transform: none; }
  .hero .beat { top: 0; transform: translateY(8px); }
  .hero[data-beat="1"] .beat[data-b="1"], .hero[data-beat="2"] .beat[data-b="2"], .hero[data-beat="3"] .beat[data-b="3"] { transform: none; }
  .hero .beat b { font-size: clamp(1.7rem, 7.5vw, 2.4rem); }
}
/* индикатор прогресса по краю экрана */
.hero .hud { transition: opacity .5s ease; }

/* ---------- подпись HUD «станка» ---------- */
.hero .hud { width: clamp(224px, 17vw, 300px); }
.hero .hud { border-radius: 8px; border-color: rgba(176, 180, 187, .26); }
.hud .hh span, .hud .hl span { font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; }
.hud .hl b { font-family: var(--mono); font-weight: 500; }
.hud .hh b { font-family: var(--mono); font-weight: 500; }

/* ---------- блоки главной: чертёжные подписи, плоские карточки ---------- */
.sec { position: relative; }
.sec .tool.wrap > .tag { display: inline-flex; align-items: center; gap: 10px; }
.sec .tool.wrap > .tag::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.card.tcard, .card.step { border-radius: 8px; transition: border-color .2s ease, transform .2s ease, background-color .2s ease; }
.card.tcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.card.tcard .num, .card.step .num { background: transparent; border: 1px solid var(--line); border-radius: 4px; color: var(--accent); }

/* «конвейер»: 4 шага в линию с соединяющей чертой */
#how .cards { position: relative; counter-reset: st; }
@media (min-width: 900px) {
  #how .cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
  #how .card.step { border-radius: 0; border-left-width: 0; }
  #how .card.step:first-child { border-left-width: 1px; border-radius: 8px 0 0 8px; }
  #how .card.step:last-child { border-radius: 0 8px 8px 0; }
  #how .card.step::after { content: "→"; position: absolute; right: -9px; top: 22px; z-index: 2; width: 18px; height: 18px; display: grid; place-items: center; font: 600 .8rem var(--mono); color: var(--accent); background: var(--bg); }
  #how .card.step:last-child::after { display: none; }
}

/* ---------- cookie: компактная полоска, не перекрывает контент ---------- */
.cookie-note { max-width: 640px; padding: 10px 14px; border-radius: 8px; gap: 8px 14px; font-size: .8rem; line-height: 1.35; bottom: max(10px, env(safe-area-inset-bottom)); }
.cookie-note p { flex: 1 1 240px; }
.cookie-note .cookie-btns { display: flex; gap: 8px; }
.cookie-note .cookie-btns .btn { min-height: 36px; padding: 0 1em; font-size: .78rem; border-radius: 6px; }
@media (max-width: 640px) { .cookie-note { left: 8px; right: 8px; padding: 8px 10px; } .cookie-note p { flex-basis: 100%; } }

/* ---------- инструменты как «окна» ---------- */
.card.tool-win, .tool .card.panel { border-radius: 8px; }
.sticky-order { position: sticky; bottom: 0; z-index: 30; }

/* ---------- панель «Ваш заказ» (калькулятор и просмотрщик) ---------- */
.order-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: none; align-items: center; gap: 12px 18px; flex-wrap: wrap; padding: 10px clamp(14px, 4vw, 40px) max(10px, env(safe-area-inset-bottom));
  background: rgba(20, 20, 21, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.order-bar.on { display: flex; }
.order-bar .ob-main { flex: 1 1 260px; display: flex; gap: 6px 18px; flex-wrap: wrap; font: 500 .82rem var(--mono); color: var(--muted); }
.order-bar .ob-main b { color: var(--text); font-weight: 600; }
.order-bar .ob-price { font: 700 1.25rem var(--mono); color: var(--accent); }
.order-bar .btn { min-height: 44px; padding: 0 1.4em; font-size: .9rem; }
body.has-order-bar { padding-bottom: 72px; }
body.has-order-bar .cookie-note { bottom: 76px; }

/* ---------- подсказка у кнопки отправки заказа ---------- */
.order-hint { margin: 10px 0 0; font: 400 .82rem/1.5 var(--sans); color: var(--muted); }
.order-hint b { color: var(--text); font-weight: 600; }

/* cookie на компьютере — справа внизу, чтобы не закрывать преимущества слева */
@media (min-width: 821px) { .cookie-note { left: auto; right: 16px; margin: 0; max-width: 420px; } }
