/* v2/v3: hero entry cards, advisor, the shared order calculator, welded schemes, info blocks.
 * Extends styles.css (same tokens: graphite + amber «metal»). */
:root {
  --tint: #e9ebed;
  --glass: #cfdde6;
  --warn-ink: #8a5a00;
  --scheme-max-h: 220px;
  --scheme-sm-max-h: 96px;
  --swing-ms: 700ms;
}

.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink);
  padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 8px; }
.tinted { background: var(--tint); }
section { scroll-margin-top: 64px; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 48px; }
.hero .wrap.hero-v2 { grid-template-columns: 1.15fr .85fr; align-items: start; }
.hero-v2 h1 { font-size: clamp(28px, 4vw, 46px); }
.hero-v2 .lead { font-size: 17px; margin-bottom: 20px; }
.entry-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.entry { display: grid; gap: 4px; align-content: start; text-decoration: none; color: #fff; padding: 14px;
  border: 1.5px solid rgba(255,255,255,.18); border-radius: var(--radius); background: rgba(255,255,255,.05);
  transition: border-color .15s, background .15s, transform .15s; }
.entry:hover { border-color: var(--accent); background: rgba(255,255,255,.09); transform: translateY(-2px); }
.entry b { font-size: 20px; }
.entry b::after { content: " →"; color: var(--accent); }
.entry > span:last-child { font-size: 14px; opacity: .85; }
.entry-art { display: grid; place-items: center; height: 100px; margin-bottom: 6px; border-radius: var(--radius-sm); background: rgba(0,0,0,.18); overflow: hidden; }
.entry-art svg { max-height: 92px; width: auto; max-width: 100%; display: block; }
.entry-art .ws-svg { border-radius: 6px; }

.card-dark { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 20px; }
.adv-title { font-size: 22px; margin: 0 0 8px; color: #fff; }
.adv-q { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.adv-q legend { font-size: 15px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.chip-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.chip-dark:hover { border-color: var(--accent); }
.chip-dark[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.adv-result { margin-top: 6px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.14); }
.adv-result b { font-size: 17px; display: block; }
.adv-result p { margin: 4px 0 12px; font-size: 15px; opacity: .9; }
.adv-wait { font-size: 14px; opacity: .85; margin: 0; }
@media (max-width: 860px) {
  .hero .wrap.hero-v2 { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 420px) {
  .entry { padding: 10px; }
  .entry b { font-size: 17px; }
  .entry-art { height: 80px; }
  .entry-art svg { max-height: 72px; }
}

/* ---------- Welded configurator ---------- */
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pattern-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .type-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pattern-grid { grid-template-columns: 1fr; } }
.type-card, .pattern-card { display: grid; gap: 2px; align-content: start; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; min-height: 44px; }
.type-card:hover, .pattern-card:hover { border-color: var(--steel-2); }
.type-card[aria-pressed="true"], .pattern-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.type-card .ws-svg { height: var(--scheme-sm-max-h); width: auto; margin: 0 auto 6px; display: block; }
.type-card > span, .pattern-card > span { font-size: 14px; color: var(--muted); }
.type-card .p, .pattern-card .p { color: var(--ink); font-weight: 600; margin-top: 4px; }
.pattern-card .ws-pattern { width: 100%; max-width: 160px; height: auto; max-height: 90px; display: block; margin-bottom: 6px; border-radius: 6px; }
@media (max-width: 520px) {
  .pattern-card { grid-template-columns: 96px 1fr; column-gap: 12px; }
  .pattern-card .ws-pattern { grid-row: span 3; margin: 0; }
}
.preview svg { display: block; }
.preview .ws-svg { height: 150px; width: auto; }
.quote-note { margin: 4px 0 12px; }
.lines li .custom-value { color: var(--muted); font-style: italic; text-align: right; }
.lines li.sub-line { padding-left: 12px; font-size: 14px; }

/* ---------- Weld schemes (weld-anim.js) ---------- */
.weld-scheme { display: grid; justify-items: center; gap: 10px; }
.weld-scheme .ws-svg { height: var(--scheme-max-h); width: auto; max-width: 100%; display: block; border-radius: 8px; }
.ws-sm .ws-svg { height: var(--scheme-sm-max-h); }
.ws-toggle { min-height: 44px; min-width: 120px; color: var(--ink); border-color: var(--steel-2); }
.ws-toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ws-fixed { margin: 0; min-height: 44px; display: flex; align-items: center; font-size: 14px; color: var(--muted); }
.ws-sash { transform-box: fill-box; transition: transform var(--swing-ms) cubic-bezier(.4, 0, .2, 1); }
.ws-hinge-left { transform-origin: left center; }
.ws-hinge-right { transform-origin: right center; }
.weld-scheme.is-open .ws-hinge-left { transform: scaleX(.22) skewY(-9deg); }
.weld-scheme.is-open .ws-hinge-right { transform: scaleX(.22) skewY(9deg); }
.ws-arrows { transition: opacity calc(var(--swing-ms) / 2); }
.weld-scheme.is-open .ws-arrows { opacity: 0; }

/* ---------- Sliding: video placeholder ---------- */
.video-stub { aspect-ratio: 16 / 9; max-width: 560px; margin-top: 10px; border-radius: var(--radius); background: var(--steel);
  color: #fff; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: 16px; }
.video-stub span:not(.video-play) { font-size: 20px; font-weight: 700; }
.video-stub small { opacity: .8; font-size: 14px; }
.video-play { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 22px; }

/* ---------- Info blocks ---------- */
.terms h3 { margin-bottom: 12px; }
.terms-row { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.terms-row b { font-size: 28px; font-weight: 800; min-width: 3.6em; }

/* ---------- Mobile: compact and readable ---------- */
@media (max-width: 520px) {
  section { padding: 44px 0; }
  .card { padding: 16px; }
  .weld-scheme .ws-svg { height: 180px; }
  .terms-row b { font-size: 24px; }
}

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

/* Header contacts: one tap block (phone + email), at least 44px high inside the 64px header */
.head-contacts { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; line-height: 1.25;
  min-height: 48px; padding: 2px 0; text-decoration: none; color: inherit; }
.head-contacts .phone { font-weight: 600; white-space: nowrap; }
.head-contacts .mail { font-size: 14px; opacity: .85; white-space: nowrap; }
.head-contacts:hover .mail { opacity: 1; text-decoration: underline; }
@media (max-width: 420px) { .logo-mark { display: none; } header .wrap { gap: 8px; } }

/* ---------- v3: shared order calculator ---------- */
.mode-hint { margin: -16px 0 12px; font-size: 15px; color: var(--muted); max-width: 46em; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; }
.tabs:empty + .add-row, .tabs[hidden] + .add-row { margin-top: 0; }
.add-row .tab.add { color: var(--ink); font-weight: 600; border-color: var(--steel-2); }
.tab-sliding::before, .tab-weld::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tab-sliding::before { background: var(--steel-2); box-shadow: 0 0 0 2px #fff; }
.tab-weld::before { background: var(--accent); }
.empty-state { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 20px; font-size: 15px; }
.empty-state p { margin: 0; }
.editor-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.editor-head .step-title { margin: 0; font-size: 18px; }
.btn-sm { padding: 10px 14px; min-height: 44px; font-size: 14px; }
.model-about p { margin: 0 0 8px; }
.model-about .btn { background: #fff; color: var(--ink); border-color: var(--steel-2); }
.video-more { margin-top: 10px; }
.step-note { font-size: 14px; font-weight: 400; color: var(--muted); }
.order-common { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 26px; }
.lines li.pos-head { border-bottom: 1px solid var(--steel-2); padding-top: 12px; font-weight: 600; }
.lines li.pos-head span:first-child { color: var(--ink); }
.lines li.pos-head:first-child { padding-top: 0; }
.lines li.common:first-of-type, .lines li.pos-head + li.common { margin-top: 0; }
.lines li.common { font-weight: 600; }
.lines li > span:last-child { white-space: nowrap; }
.install-rates { margin-top: 12px; }
nav a { min-width: 44px; text-align: center; }
.toggle { min-height: 44px; }
.lines li.empty-line span { color: var(--muted); white-space: normal; }

/* ---------- v3: «Почему мы», compact feedback ---------- */
.why-swipe { display: none; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 20px; }
.why-card h3 { font-size: 19px; margin-bottom: 12px; }
.why-card p { margin: 0 0 12px; }
.why-card .check-list { gap: 6px; font-size: 15px; }
.why-card .terms-row { flex-direction: column; align-items: flex-start; gap: 2px; }
.why-card .terms-row b { min-width: 0; flex: none; white-space: nowrap; font-size: 24px; }
.feedback-card { display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; align-items: start; }
.feedback-card .sub { margin-bottom: 0; }
@media (max-width: 860px) { .feedback-card { grid-template-columns: 1fr; gap: 12px; } }
@media (max-width: 520px) {
  .mode-hint { margin-top: -20px; font-size: 14px; }
  .modes { gap: 8px; margin-bottom: 16px; }
  .mode { padding: 10px 14px; gap: 0; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
  .mode small { display: none; }
  .preview { height: 130px; }
  .preview svg { max-height: 120px; }
  .preview .ws-svg { height: 120px; }
  textarea { min-height: 70px; }
  .mode b { font-size: 16px; }
  /* Phone: the four cards become a swipeable strip; the next card peeks in from the right. */
  .why-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 84%; gap: 12px; margin: 12px -16px 0;
    padding: 0 16px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; overscroll-behavior-x: contain; }
  .why-card { scroll-snap-align: start; }
  .why-swipe { display: block; margin: 0; font-size: 14px; }
  .why-grid:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
  .why-card h3 { margin-bottom: 8px; }
}

.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Checkout: payer switch ---------- */
.payer { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.payer legend { font-size: 15px; color: var(--muted); padding: 0; margin-bottom: 6px; width: 100%; }
.payer-opt { position: relative; flex: 1 1 200px; }
.payer-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.payer-opt span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 8px 14px;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: 15px; }
.payer-opt input:checked + span { border-color: var(--steel); background: var(--steel); color: #fff; }
.payer-opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.org-fields { display: grid; gap: 12px; }

/* ---------- Trust block next to the total and checkout ---------- */
.trust { list-style: none; padding: 0; margin: 12px 0 4px; display: grid; gap: 4px; font-size: 14px; color: var(--ink); }
.trust li { display: flex; gap: 8px; }
.trust li::before { content: "✓"; color: var(--ok); font-weight: 800; }
.summary .btn.btn-ghost { color: var(--ink); border-color: var(--steel-2); text-align: center; }
.call-link { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 4px; font-weight: 600; }
#measurePanel { scroll-margin-top: 80px; }
.dlg .trust { margin: 0; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }

/* Spam trap: invisible for people, bots fill it in (checked on the server). */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.toggle a { color: inherit; text-decoration: underline; }

/* Links from the «Что вам нужно?» block to the landing pages. */
.adv-more { margin: 12px 0 0; font-size: 14px; opacity: .85; }
