/* СИБИНТРЕЙД — стили сайта-визитки. Токены по ТЗ, раздел 4. */

@font-face {
  font-family: "Onest";
  src: url("/assets/fonts/onest-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("/assets/fonts/onest-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-cyrillic-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --graphite: #15181b;
  --graphite-2: #1d2125;
  --graphite-line: #2c3238;
  --steel: #6b7580;
  --muted: #5e6873;        /* приглушённый текст на светлом, 5.1:1 */
  --muted-dark: #9aa4ad;   /* приглушённый текст на тёмном, 7:1 */
  --alu: #f3f4f5;
  --white: #ffffff;
  --line: #dde0e3;
  --accent: #e4602a;       /* расплав: графика, акценты на тёмном */
  --accent-strong: #c24a1a;/* кнопки и текст на светлом, 4.9:1 с белым */

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --container: 1240px;
  --gutter: 24px;
  --section: 112px;
  --radius: 6px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--graphite);
  font-family: var(--font);
  font-size: 17px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }
.nw { white-space: nowrap; }
.nav__phone { display: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--white); color: var(--graphite);
  padding: 8px 16px; z-index: 100; border-radius: var(--radius);
}
.skip:focus { left: 8px; }

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

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border-radius: var(--radius);
  font: 600 16px/1 var(--font);
  text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn--primary { background: var(--accent-strong); color: var(--white); }
.btn--primary:hover { background: #a93f14; }
.btn--ghost { border: 1px solid #4a535c; color: var(--white); }
.btn--ghost:hover { border-color: var(--white); }

/* ---------- Логотип ---------- */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--white);
}
.logo__dot {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 36% 32%, #ffb48a 0, var(--accent) 38%, #8a3110 100%);
}
.logo__word { font-weight: 600; font-size: 19px; letter-spacing: 0.04em; line-height: 1; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(21, 24, 27, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--graphite-line);
  color: var(--white);
}
.header__row { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a {
  color: var(--muted-dark); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color .2s;
}
.nav a:hover { color: var(--white); }
.header__phone { color: var(--white); text-decoration: none; font-size: 15px; white-space: nowrap; }
.header__phone:hover { color: var(--accent); }
.burger { display: none; }

/* ---------- Первый экран ---------- */
.header--overlay {
  position: fixed; left: 0; right: 0;
  background: transparent; border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: background-color .3s, border-color .3s;
}
.header--overlay.is-scrolled {
  background: rgba(21, 24, 27, 0.92);
  border-bottom-color: var(--graphite-line);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}

.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(100vh, 1080px); min-height: min(100svh, 1080px);
  display: flex; flex-direction: column;
  background: var(--graphite);
  color: var(--white);
}
.hero__canvas, .hero__fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: -2;
}
.hero__fallback { object-fit: cover; opacity: .55; }
.js-canvas .hero__fallback { display: none; }
.hero__shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(21,24,27,.92) 0%, rgba(21,24,27,.55) 45%, rgba(21,24,27,.1) 100%),
    linear-gradient(0deg, rgba(21,24,27,.95) 0%, rgba(21,24,27,0) 38%);
}

.hero__inner {
  flex: 1;
  display: flex; flex-direction: column;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 40px;
  pointer-events: none;
}
.hero__inner a, .hero__inner .btn { pointer-events: auto; }

.hero__meta {
  display: flex; justify-content: space-between; gap: 24px;
  font-size: 12px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-dark);
  padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.12);
}

.hero__title {
  margin: auto 0 0;
  padding-top: 48px;
  font-size: clamp(52px, 10.4vw, 176px);
  line-height: .9;
  font-weight: 500;
  letter-spacing: -.045em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero__title .line > .reveal { display: inline-block; }
.line--indent { padding-left: 1.6em; }
.hero__tag {
  display: inline-block; vertical-align: top;
  margin: .32em 0 0 .3em;
  font-style: normal; font-size: clamp(12px, 1.05vw, 16px); line-height: 1;
  letter-spacing: .04em;
  padding: 7px 10px; border: 1px solid var(--accent); border-radius: 999px;
  color: var(--accent);
}

.hero__bottom {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 2fr);
  gap: 40px; align-items: end;
  margin-top: 48px;
}
.hero__lead { max-width: 30em; color: #c9cfd4; font-size: 17px; line-height: 27px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero__stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px; margin: 0;
}
.hero__stats div { padding: 12px 0 14px; border-top: 1px solid rgba(255,255,255,.14); }
.hero__stats dt { font-size: 26px; line-height: 32px; font-weight: 500; white-space: nowrap; }
.hero__stats dd { margin: 4px 0 0; font-size: 13px; line-height: 18px; color: var(--muted-dark); }

.hero__scale {
  justify-self: end;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  font-size: 12px; line-height: 16px; color: var(--muted-dark); letter-spacing: .04em;
}
.hero__scale-bar {
  display: block; height: 10px;
  width: calc(var(--um, 3px) * 50);
  border: 1.5px solid var(--accent); border-top: 0;
}

/* Бегущая строка марок */
.ticker {
  position: relative;
  border-top: 1px solid rgba(255,255,255,.12);
  overflow: hidden; white-space: nowrap;
  font-size: 13px; line-height: 20px; letter-spacing: .06em; color: var(--muted-dark);
  padding: 14px 0;
  background: rgba(21,24,27,.6);
}
.ticker__track { display: inline-flex; animation: ticker 48s linear infinite; }
.ticker__track span { padding: 0 22px; position: relative; }
.ticker__track span::after {
  content: ""; position: absolute; right: -3px; top: 50%;
  width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%;
  background: var(--accent);
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* Появление текста */
/* анимация только при работающем JS, иначе текст виден сразу */
.js .reveal { animation: reveal 1s cubic-bezier(.2, .7, .1, 1) both; animation-delay: var(--d, 0s); }
.js .hero__title .reveal { animation-name: reveal-up; animation-duration: 1.1s; }
@keyframes reveal { from { opacity: 0; transform: translateY(16px); } }
@keyframes reveal-up { from { transform: translateY(105%); } }

/* ---------- Секции ---------- */
.section { padding: var(--section) 0; }
.section--alt { background: var(--alu); }
.section--dark { background: var(--graphite); color: var(--white); }

.section__head { max-width: 760px; margin-bottom: 56px; }
.section__num {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; line-height: 20px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted);
}
.section__num::after {
  /* масштабная линейка */
  content: ""; width: 64px; height: 9px;
  border: 1.5px solid var(--accent); border-top: 0;
}
.section--dark .section__num { color: var(--muted-dark); }
.section h2 { margin-top: 16px; font-size: 40px; line-height: 46px; letter-spacing: -0.015em; }
.section__lead { margin-top: 18px; color: var(--muted); max-width: 40em; }

/* ---------- Карточки материалов ---------- */
.cards {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px 22px;
}
.card__num { font-size: 12px; line-height: 16px; color: var(--muted); }
.card h3 { margin-top: 14px; font-size: 20px; line-height: 26px; }
.card__grades {
  display: flex; flex-wrap: wrap; gap: 0 14px;
  margin-top: 14px; font-size: 14px; line-height: 22px; font-weight: 500;
  color: var(--graphite);
}
.card__grades span { white-space: nowrap; }
.card__analog { margin-top: 8px; font-size: 14px; line-height: 21px; color: var(--muted); }
.card__use {
  margin-top: auto; padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 14px; line-height: 21px; color: var(--graphite);
}
.frac { margin: 20px 0 18px; }
.frac__label { font-size: 12px; line-height: 16px; color: var(--accent-strong); text-transform: uppercase; letter-spacing: 0.04em; }
.frac__track {
  position: relative; height: 6px; margin-top: 10px;
  background: var(--alu); border-radius: 3px;
}
.frac__seg { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; }
.frac__ticks {
  position: absolute; left: 0; right: 0; top: 12px;
  display: flex; justify-content: space-between;
  font-size: 10px; line-height: 12px; color: var(--muted);
}
.frac__ticks i { font-style: normal; }
.frac__ticks i:last-child { margin-right: -2px; }
.frac { padding-bottom: 14px; }

.card--cta {
  background: var(--graphite); border-color: var(--graphite); color: var(--white);
  justify-content: space-between; gap: 16px;
}
.card--cta h3 { margin-top: 0; }
.card--cta p { color: var(--muted-dark); font-size: 15px; line-height: 23px; }
.card--cta .btn { align-self: flex-start; }


/* ---------- Применение ---------- */
.tiles {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.tile { padding: 28px 24px 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tile__tag {
  display: inline-block; font-size: 12px; line-height: 16px; padding: 4px 8px;
  border: 1px solid var(--accent); color: var(--accent-strong); border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.tile h3 { margin-top: 20px; font-size: 19px; line-height: 25px; }
.tile p { margin-top: 10px; font-size: 15px; line-height: 23px; color: var(--muted); }

/* ---------- Как работаем ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
  counter-reset: none;
}
.step { position: relative; padding-top: 36px; }
.step::before {
  /* соединительная линия */
  content: ""; position: absolute; top: 9px; left: 26px; right: -32px;
  height: 1px; background: var(--graphite-line);
}
.step:last-child::before { right: 0; }
.step__num {
  position: absolute; top: 0; left: 0;
  font-size: 13px; line-height: 20px; color: var(--accent);
  background: var(--graphite); padding-right: 8px;
}
.step h3 { font-size: 20px; line-height: 26px; }
.step p { margin-top: 10px; font-size: 15px; line-height: 23px; color: var(--muted-dark); }

/* ---------- О компании ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
.about .section__head { margin-bottom: 0; }
.about__body p + p { margin-top: 16px; }
.about__body { padding-top: 36px; }
.about__list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.about__list li {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 24px;
}
.about__list .mono { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Контакты ---------- */
.contacts { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: start; }
.contacts__main { display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.contact__label { font-size: 13px; line-height: 20px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.contact__value { font-size: 30px; line-height: 38px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.contact__value--sm { font-size: 19px; line-height: 28px; font-weight: 500; }
a.contact:hover .contact__value { color: var(--accent-strong); }
.requisites { background: var(--alu); border-radius: var(--radius); padding: 28px; }
.requisites__title { font-size: 13px; line-height: 20px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.requisites dl { margin: 16px 0 0; }
.requisites dl div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.requisites dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.requisites dt { font-size: 13px; line-height: 20px; color: var(--muted); }
.requisites dd { margin: 2px 0 0; font-size: 16px; line-height: 24px; }
.requisites dd.mono { font-size: 15px; }

/* ---------- Подвал ---------- */
.footer { background: var(--graphite); color: var(--muted-dark); padding: 40px 0; font-size: 14px; line-height: 22px; }
.footer__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.footer__note { margin-left: auto; }

/* ---------- 404 ---------- */
.notfound {
  min-height: calc(100vh - var(--header-h) - 102px);
  display: flex; align-items: center;
  background-color: var(--graphite);
  background-image: radial-gradient(rgba(154, 164, 173, 0.16) 1px, transparent 1.2px);
  background-size: 22px 22px;
  color: var(--white); padding: 96px 0;
}
.notfound h1 { margin-top: 16px; font-size: 44px; line-height: 50px; }
.notfound p:not(.eyebrow) { margin-top: 16px; color: #c9cfd4; }
.notfound .btn { margin-top: 32px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
  .nav { gap: 20px; }
  .header__cta { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .step:nth-child(2n)::before { right: 0; }
  .hero__bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero__scale { display: none; }
}

@media (max-width: 960px) {
  :root { --section: 80px; --header-h: 64px; }
  .burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; margin-left: 4px; padding: 0 10px;
    background: none; border: 0; cursor: pointer;
  }
  .burger span { display: block; height: 2px; background: var(--white); transition: transform .2s; }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .header__phone { margin-left: auto; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--graphite); border-bottom: 1px solid var(--graphite-line);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav .nav__phone { display: block; color: var(--accent); border-bottom: 0; }
  .nav a { padding: 14px 0; font-size: 17px; color: var(--white); border-bottom: 1px solid var(--graphite-line); }

  .hero__inner { padding-top: calc(var(--header-h) + 24px); padding-bottom: 28px; }
  .hero__bottom { grid-template-columns: 1fr; gap: 32px; margin-top: 36px; }
  .hero__shade {
    background:
      linear-gradient(0deg, rgba(21,24,27,.96) 0%, rgba(21,24,27,.7) 55%, rgba(21,24,27,.35) 100%);
  }
  .about, .contacts { grid-template-columns: 1fr; gap: 32px; }
  .about__body { padding-top: 0; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --section: 64px; }
  body { font-size: 16px; line-height: 26px; }
  .logo__word { font-size: 17px; }
  .header__phone { font-size: 13px; }
  .hero__coords { display: none; }
  /* «Металлические» ≈ 7 em: размер считаем от ширины, чтобы слово помещалось в поля */
  .hero__title { font-size: clamp(34px, calc((100vw - 2 * var(--gutter)) / 7.3), 64px); padding-top: 32px; }
  .line--indent { padding-left: 0; }
  .hero__tag { margin-top: .25em; }
  .hero__lead { font-size: 16px; line-height: 26px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__stats { column-gap: 20px; }
  .hero__stats dt { font-size: 21px; line-height: 28px; }
  .ticker { font-size: 12px; padding: 12px 0; }
  .section__head { margin-bottom: 36px; }
  .section h2 { font-size: 30px; line-height: 36px; }
  .cards, .tiles, .steps { grid-template-columns: 1fr; }
  .step::before { display: none; }
  .contact { grid-template-columns: 1fr; gap: 4px; padding: 18px 0; }
  .contact__value { font-size: 24px; line-height: 32px; }
  .contact__value--sm { font-size: 17px; line-height: 26px; }
  .about__list li { grid-template-columns: 1fr; gap: 2px; }
  .requisites { padding: 20px; }
  .footer__note { margin-left: 0; }
  .notfound h1 { font-size: 32px; line-height: 38px; }
}

@media (max-width: 380px) {
  .header__phone { display: none; }
  .burger { margin-left: auto; }
}

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