/* SilentCore — лендинг «Start a project». Та же монохромная система, что и у сайта компании.
   Выбранное состояние: мелкие переключатели инвертируются, крупные карточки помечаются кольцом. */

:root {
  color-scheme: light;

  --paper: #f2f2ee;
  --paper-2: #e9e9e4;
  --white: #ffffff;

  --ink: #0b0d10;
  --ink-2: #2a2f35;
  --muted: #5a6168;
  --faint: #8b9198;
  --line: rgba(11, 13, 16, 0.13);
  --line-soft: rgba(11, 13, 16, 0.07);

  --black: #030405;
  --black-2: #0b0d11;
  --black-3: #13161b;
  --ink-on-dark: #f3f4f2;
  --muted-on-dark: rgba(243, 244, 242, 0.68);
  --faint-on-dark: rgba(243, 244, 242, 0.46);
  --line-dark: rgba(255, 255, 255, 0.11);
  --line-dark-soft: rgba(255, 255, 255, 0.06);

  --danger: #b4342f;
  --danger-on-dark: #ff9a95;

  --radius: 8px;
  --radius-lg: 12px;
  --shell: 1180px;
  --header-offset: 76px;

  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", "IBM Plex Sans", ui-sans-serif, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-offset); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, pre, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--ink); color: var(--white); }
.section--dark ::selection, .hero ::selection { background: var(--white); color: var(--ink); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 100;
  padding: 10px 14px;
  background: var(--ink); color: var(--white);
  border-radius: var(--radius); font-size: 0.9rem;
}
.skip-link:focus { top: 12px; }

.shell { width: min(100% - 40px, var(--shell)); margin-inline: auto; }

.eyebrow {
  margin-bottom: 14px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.hero .eyebrow, .section--dark .eyebrow { color: var(--faint-on-dark); }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 2.9vw, 2.4rem); line-height: 1.12; letter-spacing: -0.025em; }

.lead { font-size: clamp(1rem, 1.3vw, 1.1rem); line-height: 1.62; max-width: 62ch; color: var(--muted-on-dark); }

.panel-label {
  display: block;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
}

/* ─────────── кнопки ─────────── */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 0.92rem; font-weight: 500; white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.button-primary { background: var(--ink); color: var(--white); }
.button-primary:hover { background: var(--ink-2); }
.hero .button-primary, .section--dark .button-primary { background: var(--ink-on-dark); color: var(--ink); }
.hero .button-primary:hover, .section--dark .button-primary:hover { background: var(--white); }
.button-ghost { border-color: rgba(255, 255, 255, 0.28); color: var(--ink-on-dark); }
.button-ghost:hover { border-color: rgba(255, 255, 255, 0.6); }
.button-quiet { border-color: var(--line); background: var(--white); color: var(--ink-2); }
.button-quiet:hover { border-color: var(--faint); }
.section--dark .button-quiet { border-color: var(--line-dark); background: transparent; color: var(--ink-on-dark); }
.section--dark .button-quiet:hover { border-color: rgba(255, 255, 255, 0.4); }
.button-wide { width: 100%; }

/* ─────────── шапка ─────────── */

.site-header {
  position: fixed; z-index: 50; top: 12px; left: 50%;
  width: min(100% - 24px, var(--shell));
  transform: translateX(-50%);
  border: 1px solid var(--line-dark); border-radius: 14px;
  background: rgba(3, 4, 5, 0.78); color: var(--ink-on-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease;
}
.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(242, 242, 238, 0.92);
  color: var(--ink);
  box-shadow: 0 8px 30px rgba(11, 13, 16, 0.08);
}
.header-inner { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 8px 8px 8px 14px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
/* Логотип — растр с чёрным фоном в исходнике, поэтому заполняет плитку целиком:
   так фон знака сливается с плиткой без каймы. */
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

/* Локап: название в две строки, дескриптор мельче и с разрядкой. */
.brand-name {
  display: grid;
  gap: 2px;
  line-height: 1;
}
.brand-name__main {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.brand-name__sub {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
  white-space: nowrap;
}

.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-dark); border-radius: 999px; }
.site-header.is-scrolled .lang-switch { border-color: var(--line); }
.lang {
  min-width: 36px; height: 28px;
  border: 0; border-radius: 999px;
  background: transparent; color: inherit;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.06em;
  opacity: 0.6;
  transition: opacity 140ms ease, background 140ms ease, color 140ms ease;
}
.lang:hover { opacity: 1; }
.lang.is-active { background: var(--ink-on-dark); color: var(--ink); opacity: 1; }
.site-header.is-scrolled .lang.is-active { background: var(--ink); color: var(--white); }

.header-note {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  opacity: 0.5; text-align: center;
}
.header-cta { min-height: 38px; padding: 0 14px; font-size: 0.86rem; }
.site-header .button-primary { background: var(--ink-on-dark); color: var(--ink); }
.site-header.is-scrolled .button-primary { background: var(--ink); color: var(--white); }

/* ─────────── hero ─────────── */

.hero {
  padding: calc(var(--header-offset) + 72px) 0 84px;
  background: var(--black); color: var(--ink-on-dark);
}
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.08; letter-spacing: -0.03em; max-width: 20ch; }
.hero .lead { margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* ─────────── секции ─────────── */

.section { padding: 88px 0; }
.section--dark { background: var(--black); color: var(--ink-on-dark); }
#configurator, #examples, #plan, #brief { scroll-margin-top: var(--header-offset); }

.section-head { max-width: 660px; margin-bottom: 40px; }
.section-head p:not(.eyebrow) { margin-top: 14px; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.section--dark .section-head p:not(.eyebrow) { color: var(--muted-on-dark); }

/* ─────────── конфигуратор ─────────── */

.cfg { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cfg__steps { display: grid; gap: 14px; min-width: 0; }
.cfg__summary { position: sticky; top: calc(var(--header-offset) + 12px); }

.step {
  padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.step__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.step__num { color: var(--faint); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; }
.step__head h3 { font-size: 1.1rem; letter-spacing: -0.015em; }
.step__hint { margin-left: auto; color: var(--faint); font-family: var(--font-mono); font-size: 0.7rem; }

.options { display: grid; gap: 8px; }
.options--type { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.options--mod { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.options--inline { display: flex; flex-wrap: wrap; gap: 6px; }

.option {
  text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}
.option:hover { border-color: var(--faint); }

/* Крупная карточка — помечается кольцом поверх плотной поверхности. */
.option--type { display: grid; gap: 6px; align-content: start; padding: 16px; }
.option--type .option__label { font-size: 0.96rem; font-weight: 600; letter-spacing: -0.01em; }
.option--type .option__desc { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.option--type[aria-checked="true"] {
  border-color: transparent;
  background: var(--white);
  box-shadow: 0 0 0 2px var(--ink);
}

/* Мелкий переключатель — инвертируется. */
.option--mod { display: flex; align-items: center; gap: 10px; padding: 11px 13px; font-size: 0.9rem; }
.option__box {
  flex: none; width: 15px; height: 15px;
  border: 1px solid var(--faint); border-radius: 4px;
  background: var(--white);
  position: relative;
}
.option--mod[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.option--mod[aria-pressed="true"] .option__box { background: var(--white); border-color: var(--white); }
.option--mod[aria-pressed="true"] .option__box::after {
  content: ""; position: absolute; inset: 0;
  background: var(--ink);
  clip-path: polygon(14% 46%, 38% 70%, 86% 22%, 96% 32%, 38% 90%, 4% 56%);
}

.option--inline { padding: 9px 14px; font-size: 0.88rem; border-radius: 999px; }
.option--inline[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

.mod-group + .mod-group { margin-top: 18px; }
.mod-group__label {
  display: block; margin-bottom: 8px;
  color: var(--faint); font-family: var(--font-mono);
  font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
}

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.field-block { display: grid; gap: 8px; align-content: start; }
.field-label { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.field-label em { color: var(--faint); font-style: normal; }
.field-hint { color: var(--faint); font-size: 0.8rem; line-height: 1.5; }

/* ─────────── смета ─────────── */

.summary {
  display: flex; flex-direction: column;
  padding: 22px;
  border: 1px solid var(--ink); border-radius: var(--radius-lg);
  background: var(--white);
}
.summary__title {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.2;
}

.summary__price {
  display: grid; gap: 4px;
  margin-top: 16px; padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--ink); color: var(--ink-on-dark);
}
.summary__price-label {
  color: var(--faint-on-dark); font-family: var(--font-mono);
  font-size: 0.64rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
}
.summary__price-value {
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums;
}
.summary__price-note { color: var(--faint-on-dark); font-size: 0.74rem; line-height: 1.4; }

/* факты — сетка 2×2 фиксированной высоты: длинные значения не раздувают смету */
.summary__facts {
  margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  border-radius: var(--radius); overflow: hidden;
  background: var(--line-soft); border: 1px solid var(--line-soft);
}
.summary__facts > div { display: grid; gap: 3px; align-content: start; padding: 10px 12px; background: var(--white); }
.summary__facts dt {
  color: var(--faint); font-family: var(--font-mono);
  font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.summary__facts dd { color: var(--ink); font-size: 0.86rem; line-height: 1.35; }

/* состав — единственная часть, которая растёт: занимает остаток высоты и прокручивается внутри */
.summary__scope {
  flex: 1 1 0; min-height: 96px;
  display: flex; flex-direction: column;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.summary__count { color: var(--ink-2); }
.summary__scope ul {
  flex: 1 1 0; min-height: 0; overflow-y: auto;
  margin-top: 2px; display: grid; align-content: start; gap: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent);
  scrollbar-width: thin;
}
.summary__scope li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 6px 0; border-bottom: 1px dashed var(--line-soft);
  color: var(--ink-2); font-size: 0.84rem; line-height: 1.35;
}
.summary__scope li:last-child { border-bottom: 0; margin-bottom: 14px; }
.summary__scope li b { flex: none; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary__scope li.is-core { color: var(--ink); font-weight: 500; }
.summary__empty { color: var(--faint) !important; border-bottom: 0 !important; }

.summary__actions { display: grid; gap: 8px; margin-top: 14px; }
.summary__note { margin-top: 14px; color: var(--faint); font-size: 0.76rem; line-height: 1.5; }

/* ─────────── hero: плитки выбора ─────────── */

.hero .lead { max-width: 62ch; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 36px; }
.tile {
  display: grid; gap: 6px; align-content: start;
  min-height: 132px; padding: 16px 16px 18px;
  text-align: left;
  border: 1px solid var(--line-dark); border-radius: var(--radius-lg);
  background: var(--black-2); color: var(--ink-on-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.tile:hover { border-color: rgba(255, 255, 255, 0.34); background: var(--black-3); }
.tile[aria-checked="true"] { border-color: transparent; background: var(--black-3); box-shadow: 0 0 0 2px var(--ink-on-dark); }
.tile__num { color: var(--faint-on-dark); font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.12em; }
.tile__label { font-size: 0.98rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.tile__desc { color: var(--muted-on-dark); font-size: 0.84rem; line-height: 1.45; }
/* «пока не знаю» — пунктир и стрелка: это другой путь, не восьмой тип */
.tile--free { border-style: dashed; background: transparent; }
.tile--free:hover { background: rgba(255, 255, 255, 0.04); }
.tile--free .tile__label::after { content: " →"; }

/* ─────────── плата ─────────── */

.build { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: stretch; }
.build__board { min-width: 0; }
/* смета по высоте ровно как левая колонка; её контент не влияет на высоту ряда */
.build__summary { position: relative; min-height: 560px; }
.build__summary .summary { position: absolute; inset: 0; }

.type-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.type-row__label { color: var(--faint); font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.type-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.board {
  position: relative;
  aspect-ratio: 720 / 560;
  container-type: inline-size;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius-lg);
  background: #0b0d11 radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, 0.05), transparent 62%);
  color: var(--ink-on-dark);
  box-shadow: 0 24px 60px rgba(11, 13, 16, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.board__svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.bd-grid { stroke: #ffffff; stroke-opacity: 0.04; stroke-width: 1; }
.bd-bus { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 1.5; }
.bd-trace { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 1.5; stroke-linejoin: round; }
/* включённая дорожка прочерчивается к ядру */
.bd-trace-on {
  fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 400; stroke-dashoffset: 400; opacity: 0.85;
  transition: stroke-dashoffset 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bd-trace-on.is-on { stroke-dashoffset: 0; }
.bd-chip { fill: url(#bdChip); stroke: rgba(255, 255, 255, 0.18); stroke-width: 1; }
.bd-pin { fill: rgba(255, 255, 255, 0.16); }
.bd-pulse { display: none; }
.bd-pulse.is-on { display: inline; }

/* блоки — настоящие кнопки поверх SVG, размер задан в процентах от платы */
.board__mods { position: absolute; inset: 0; }
.bd-mod {
  position: absolute;
  display: flex; align-items: center; gap: 10px;
  padding: 0 clamp(8px, 1.8cqw, 14px);
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px;
  background: #14171d; color: rgba(243, 244, 242, 0.82);
  font-size: clamp(10px, 1.75cqw, 14px); line-height: 1.25;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.bd-mod:hover { border-color: rgba(255, 255, 255, 0.36); color: var(--ink-on-dark); }
.bd-mod__dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: background 140ms ease, box-shadow 140ms ease;
}
.bd-mod[aria-pressed="true"], .bd-chip-btn[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--c) 70%, transparent);
  background: color-mix(in srgb, var(--c) 12%, #14171d);
  color: var(--ink-on-dark);
}
.bd-mod[aria-pressed="true"] .bd-mod__dot, .bd-chip-btn[aria-pressed="true"] .bd-mod__dot { background: var(--c); box-shadow: 0 0 10px var(--c); }

/* ядро */
.board__core {
  position: absolute;
  display: grid; align-content: center; justify-items: center; gap: 5px;
  padding: 10px; text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 14px;
  background: linear-gradient(135deg, #1c2027, #0a0c10);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.6);
}
.board__core img { width: clamp(18px, 3.6cqw, 28px); height: auto; border-radius: 7px; }
.board__core-label { font-size: clamp(9px, 1.55cqw, 13px); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.board__core-meta { color: var(--faint-on-dark); font-family: var(--font-mono); font-size: clamp(7px, 1.2cqw, 10px); letter-spacing: 0.06em; }
.board.is-idle .board__core { border-style: dashed; }

/* на телефоне блоки — списком под платой, на плате остаются дорожки и импульсы */
.bd-list { display: none; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bd-chip-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--white); color: var(--ink);
  font-size: 0.86rem;
}
.bd-chip-btn .bd-mod__dot { background: rgba(11, 13, 16, 0.22); }
.bd-chip-btn[aria-pressed="true"] { color: var(--ink); background: color-mix(in srgb, var(--c) 14%, var(--white)); }

/* настройки проекта под платой: две колонки на десктопе */
.tune {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-top: 14px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--white);
}
.tune .option--inline { padding: 7px 12px; font-size: 0.84rem; }
.tune .field-hint { min-height: 2.9em; }

/* ─────────── плашка заявки ─────────── */

.stickybar {
  position: fixed; z-index: 40;
  left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  width: min(100% - 24px, 720px);
  padding: 10px 10px 10px 18px;
  border: 1px solid var(--line-dark); border-radius: 14px;
  background: rgba(3, 4, 5, 0.84); color: var(--ink-on-dark);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.stickybar[hidden] { display: none; }
.stickybar__text { flex: 1; min-width: 0; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stickybar .button-primary { flex: none; min-height: 40px; background: var(--ink-on-dark); color: var(--ink); }

.link-button {
  margin-top: 20px; padding: 0;
  border: 0; background: none;
  color: var(--ink-on-dark); font-size: 0.9rem; text-align: left;
  text-decoration: underline; text-underline-offset: 3px;
  opacity: 0.78; transition: opacity 140ms ease;
}
.link-button:hover { opacity: 1; }
[data-mode="free"] .form-attached { display: none; }
.form-attached[hidden] { display: none; }

/* ─────────── кейсы ─────────── */

.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.case-card {
  display: flex; flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line-dark); border-radius: var(--radius-lg);
  background: var(--black-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--ink-on-dark);
}
.case-card__meta {
  color: var(--faint-on-dark); font-family: var(--font-mono);
  font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.case-card h3 { margin: 8px 0 8px; font-size: 1.04rem; line-height: 1.3; letter-spacing: -0.015em; }
.case-card__problem { color: var(--muted-on-dark); font-size: 0.88rem; line-height: 1.55; }
.case-card__stack {
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--line-dark-soft);
  color: var(--faint-on-dark); font-family: var(--font-mono);
  font-size: 0.7rem; line-height: 1.5;
}

.case-card__cover {
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}

/* Обложка кейса — авторская графика, а не снимок клиентской системы. */
.work-row__cover {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}


/* ─────────── фазы ─────────── */

.phases {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--line-soft);
}
.phase { display: grid; grid-template-rows: auto 1fr; gap: 14px; padding: 22px; background: var(--white); }
.phase__num { color: var(--faint); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; }
.phase h3 { font-size: 1.04rem; letter-spacing: -0.015em; }
.phase h3 small {
  display: block; margin-top: 5px;
  color: var(--faint); font-family: var(--font-mono);
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.phase p { margin-top: 10px; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

/* ─────────── бриф ─────────── */

.brief { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }
.brief__text { margin-top: 14px; color: var(--muted-on-dark); font-size: 1rem; line-height: 1.6; }
.brief__facts { margin-top: 26px; display: grid; gap: 1px; background: var(--line-dark-soft); }
.brief__facts > div { display: grid; gap: 4px; padding: 13px 0; background: var(--black); }
.brief__facts dt {
  color: var(--faint-on-dark); font-family: var(--font-mono);
  font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.brief__facts dd { color: rgba(243, 244, 242, 0.86); font-size: 0.9rem; }

.brief__form {
  padding: 24px;
  border: 1px solid var(--line-dark); border-radius: var(--radius-lg);
  background: var(--black-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.brief__form .field-label { color: var(--muted-on-dark); font-size: 0.82rem; }
.brief__form .field-label em { color: var(--faint-on-dark); }

.field input, .field textarea {
  width: 100%;
  min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-on-dark);
  font: inherit; font-size: 0.92rem;
  transition: border-color 140ms ease, background 140ms ease;
}
.field textarea { min-height: 112px; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint-on-dark); }
.field input:hover, .field textarea:hover { border-color: rgba(255, 255, 255, 0.24); }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--ink-on-dark); background: rgba(255, 255, 255, 0.07); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger-on-dark); }

.field-error:empty { display: none; }
.field-error { color: var(--danger-on-dark); font-size: 0.78rem; }

.form-attached {
  margin-top: 18px; padding: 14px 16px;
  border: 1px solid var(--line-dark-soft); border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
}
.form-attached .panel-label { color: var(--faint-on-dark); margin-bottom: 8px; }
.form-attached pre {
  overflow-x: auto;
  color: var(--muted-on-dark);
  font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word;
}

.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.form-note { margin-top: 12px; color: var(--faint-on-dark); font-size: 0.78rem; line-height: 1.5; }

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

.site-footer { padding: 36px 0 32px; border-top: 1px solid var(--line); background: var(--paper-2); }
.footer-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.footer-text { max-width: 52ch; min-width: 260px; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.footer-nav a { padding: 6px 10px; border-radius: var(--radius); color: var(--ink-2); font-size: 0.85rem; font-weight: 500; }
.footer-nav a:hover { background: rgba(11, 13, 16, 0.06); }
.copyright {
  grid-column: 1 / -1; margin-top: 6px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint); font-family: var(--font-mono); font-size: 0.72rem;
}

/* ─────────── адаптив ─────────── */

@media (max-width: 1060px) {
  .cfg { grid-template-columns: 1fr; }
  .cfg__summary { position: static; }
  .build { grid-template-columns: 1fr; }
  .build__summary { min-height: 0; }
  .build__summary .summary { position: static; }
  .summary__scope { flex: none; min-height: 0; }
  .summary__scope ul { flex: none; max-height: 240px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief { grid-template-columns: 1fr; gap: 32px; }
  .options--type { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 32px, var(--shell)); }
  .section { padding: 68px 0; }
  .hero { padding: calc(var(--header-offset) + 40px) 0 64px; }
  .hero h1 { font-size: clamp(1.8rem, 8vw, 2.3rem); }
  .header-note { display: none; }
  .header-cta { display: none; }
  .lang-switch { justify-self: end; }
  .header-inner { grid-template-columns: auto 1fr auto; }
  .options--type { grid-template-columns: 1fr; }
  .options--mod { grid-template-columns: 1fr; }
  .board__mods { display: none; }
  .bd-list { display: flex; }
  .type-chips .option--inline { padding: 6px 10px; font-size: 0.78rem; }
  .board { aspect-ratio: 720 / 460; }
  .stickybar { bottom: 10px; padding: 8px 8px 8px 14px; gap: 10px; }
  .stickybar__text { font-size: 0.82rem; }
  .case-grid { grid-template-columns: 1fr; }
  .phases { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .tune { grid-template-columns: 1fr; gap: 16px; padding: 14px; }
  .tune .field-hint { min-height: 0; }
  .summary__price-value { font-size: 1.5rem; }
  .step { padding: 18px; }
  .footer-inner { grid-template-columns: 1fr; gap: 16px; }
  .footer-nav { margin-left: -10px; justify-content: flex-start; }
  .footer-text { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .option, .site-header, .field input, .field textarea, .tile, .bd-mod, .bd-trace-on { transition: none; }
}
