/* Page CSS for WERLED — only what sits inside a visual and the kit's system.css lacks
   (references/system.md: "page CSS only where a reference says page CSS"). */

/* Brand gradient, sampled from the client's own logo mark (blue → coral), used sparingly as an
   accent on dark grounds instead of leaving them flat black. */
:root {
  --brand-blue: #3b78c4;
  --brand-coral: #f75f4d;
  --brand-gradient: linear-gradient(135deg, var(--brand-blue), var(--brand-coral));
}

/* Legal pages (privacy-policy.html, personal-data-consent.html): plain long-form documents, built
   on the same tokens/fonts as the main page but without its marketing chrome (nav mega-menu, hero,
   moments). A simple header/footer and a readable, width-constrained article. */
.legal-header, .legal-footer { padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.legal-footer { border-bottom: 0; border-top: 1px solid var(--line); margin-top: var(--s-9); }
.legal-header__bar, .legal-footer__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; }
.legal-header__links { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.legal-header__links a, .legal-footer__bar a { font-size: var(--t-small); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); color: var(--ink); }
.legal-footer__bar span { font-size: var(--t-small); color: var(--muted); }
.legal-main { padding-block: var(--s-9); }
.legal-content { max-width: 68ch; margin-inline: auto; }
.legal-content > * + * { margin-top: var(--s-5); }
.legal-content h1 { margin-top: var(--s-3); }
.legal-content h2 { margin-top: var(--s-8); font-size: var(--t-h3); }
.legal-content ul { padding-left: 1.2em; display: grid; gap: var(--s-2); }
.legal-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); color: var(--action); }
.legal-content__nav { display: flex; gap: var(--s-6); flex-wrap: wrap; padding-top: var(--s-6); border-top: 1px solid var(--line); }
.legal-content__nav a { font-weight: 500; }
@media (max-width: 639px) { .legal-main { padding-block: var(--s-7); } }

/* Hero accent word + trust-strip stat dock (conversion: hard numbers right under the fold) */
h1 .accent { color: var(--accent); }

/* Hero photo (1600×900, 16:9) was forced to fill the split's full column height — a portrait-ish
   box next to a landscape photo, so object-fit:cover cropped away more than half its width to make
   it fit. Sizing the box to the photo's own ratio shows the whole frame, and centering both columns
   turns the leftover height difference into even, intentional space instead of a dead gap under the
   shorter text column. */
@media (min-width: 1024px) {
  .hero--split .hero__grid { align-items: center; }
  .hero--split .hero__media { height: auto; aspect-ratio: 16 / 9; align-self: center; }
  .hero--split .hero__text { align-self: center; }
}

/* Header logo a touch bigger (the kit's default 24px read small); footer's own mark is untouched */
header.nav .nav__logo img { height: 32px; }

/* Hero buttons: the kit's .btn-row gap (12px) read cramped next to two xl buttons */
.hero__text .btn-row { gap: var(--s-5); }

/* .link on a <button> (the kit's .link only resets an <a>'s look): strip the browser's own
   button chrome (grey box, border, padding) so it reads as a plain inline link, not a form field. */
button.link { appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.trust-strip {
  position: relative; overflow: hidden; padding-block: var(--s-9);
  background:
    radial-gradient(52% 120% at 4% 8%, color-mix(in oklab, var(--brand-blue) 38%, transparent), transparent 62%),
    radial-gradient(52% 120% at 96% 92%, color-mix(in oklab, var(--brand-coral) 32%, transparent), transparent 62%),
    var(--bg);
}
.trust-strip__in { position: relative; display: flex; flex-direction: column; gap: var(--s-7); }
.trust-strip__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-8); flex-wrap: wrap; }
.trust-strip__lead { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 3.4vw, 46px); letter-spacing: -0.03em; }
.trust-strip__graphic { width: min(260px, 26vw); height: auto; flex: none; color: var(--ink); }
@media (max-width: 1023px) { .trust-strip__graphic { display: none; } }
.hero-stats { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-6); margin: 0; padding-top: var(--s-7); }
.hero-stats::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--brand-gradient); opacity: .7; }
.hero-stats dd {
  margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 3.4vw, 52px); letter-spacing: -0.03em;
  background: var(--brand-gradient); background-clip: text; -webkit-background-clip: text; color: transparent;
}
.hero-stats dt { margin-top: var(--s-2); font-size: var(--t-small); color: var(--muted); font-weight: 400; }
@media (max-width: 639px) { .hero-stats { grid-template-columns: 1fr 1fr; row-gap: var(--s-6); } }

/* Use-cases visual (sections.md Product, composition "bleed": the product at anchor scale) */
.use-single { height: 560px; width: 100%; }
@media (max-width: 1023px) { .use-single { height: 420px; } }
@media (max-width: 639px) { .use-single { height: auto; aspect-ratio: 4/3; } }

/* Size line-up (the range/configurator section) */
.size-choice-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-5); }
.size-preset {
  min-width: 0; min-height: 84px; display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); color: var(--ink);
  text-align: left; cursor: pointer; font: inherit; transition: border-color .18s ease, background .18s ease;
}
.size-preset__icon { flex: none; width: 40px; height: 32px; color: var(--muted); transition: color .18s ease; }
.size-preset__text { display: grid; gap: var(--s-1); min-width: 0; }
.size-preset strong { font-size: var(--t-card); font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.size-preset span span { color: var(--muted); font-size: var(--t-small); }
.size-preset:hover { border-color: var(--action); }
.size-preset.is-selected .size-preset__icon, .size-preset[aria-pressed="true"] .size-preset__icon { color: var(--action); }
.size-preset.is-selected, .size-preset[aria-pressed="true"] { border-color: var(--action); background: var(--surface); }
.size-preset:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
@media (max-width: 639px) {
  .size-choice-group { grid-template-columns: 1fr 1fr; }
  .size-preset strong { white-space: normal; }
}

.config-form-fields { display: grid; gap: var(--s-5); align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: var(--s-3); }
.dimension-times { padding-bottom: var(--s-3); color: var(--muted); }
.field-stepper { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: var(--s-1); }
.field-stepper input[type="number"] { min-width: 0; padding-inline: var(--s-1); text-align: center; }
.stepper-button {
  display: grid; width: 40px; height: 44px; place-items: center; padding: 0; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--bg); color: var(--action); font-size: 20px; cursor: pointer;
}
.stepper-button:hover:not(:disabled) { border-color: var(--action); }
.stepper-button:disabled { color: var(--muted); cursor: not-allowed; opacity: .55; }
.custom-size-fields { display: grid; gap: var(--s-3); margin-top: var(--s-3); }
.custom-size-fields[hidden] { display: none; }
.control-group { margin: 0; padding: 0; border: 0; display: grid; gap: var(--s-2); }
.control-group legend { padding: 0; font-size: var(--t-small); font-weight: 500; margin-bottom: var(--s-1); }
.choice {
  display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); background: var(--bg); cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease;
}
.choice:hover { border-color: var(--brand-blue); }
.choice:has(input:checked) { border-color: transparent; box-shadow: 0 0 0 1.5px var(--brand-blue); }
.choice input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--action); flex: none; }
.choice-copy strong { font-size: var(--t-small); font-weight: 500; }
.check-choice {
  display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); color: var(--ink); font-size: var(--t-small); font-weight: 400; cursor: pointer;
  transition: border-color .18s ease;
}
.check-choice:hover { border-color: var(--brand-coral); }
.check-choice input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--action); flex: none; }

/* Custom select arrow (the browser default read as bare/unstyled against the kit's own inputs) */
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) calc(50% - 3px), calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: var(--s-8);
}
.field select:disabled { opacity: .6; cursor: not-allowed; }

#range > .wrap.grid, #usecases > .wrap.grid, #specs > .wrap.grid { align-content: center; }

/* Quote form and config: their content doesn't stay a fixed one-screen size like the kit's other
   sections — the quote form is short, and config grew taller once the summary/CTA were folded into
   it (see below), so forcing either to exactly 100svh either left dead space or clipped content
   (reported as a "странный промежуток" / an overlapping block). Both just size to their own content. */
.quote-section, .config-section { padding: var(--padt) 0 var(--padb); }
.quote-section > .wrap.grid, .config-section > .wrap.grid { height: auto; align-content: start; align-items: start; }

/* Config summary: the live recap (size, cabinet count, price placeholder) and the CTA, folded into
   the configurator instead of a separate full-screen section (it only ever repeated #range's own
   numbers and never had a real price to show — a dead screen between picking a size and the form). */
.config-summary { margin-top: var(--s-7); }
.summary-dimensions { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.summary-divider { height: 1px; background: var(--line); margin-bottom: var(--s-5); }
.summary-price { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-size: var(--t-small); flex-wrap: wrap; margin: var(--s-3) 0 var(--s-5); }
.summary-price span { color: var(--muted); }
.summary-price strong { font-size: var(--t-lead); }

/* Spec rows widen the value column a little for long Russian labels */
.rows--spec .rows__value { color: var(--ink); }

/* The drawing and the rows list are rarely the same natural height (the list is usually shorter) —
   centering both as groups within the row turns the leftover space into even margins top and bottom
   instead of a single dead gap under the shorter column. */
#specs > .wrap.grid { align-items: center; }

/* Technical dimension drawings (specs + range sections) */
.drawing-cabinet, .drawing-grid {
  position: relative; margin: 0; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
}
.drawing-cabinet { margin-top: var(--s-6); }
.drawing-cabinet svg, .drawing-grid svg { display: block; width: 100%; height: auto; }
.drawing-cabinet--photo img { display: block; width: 100%; height: auto; border-radius: var(--r-sm); }
.drawing-cabinet__dim, .drawing-grid__dim {
  display: block; margin-top: var(--s-2); font-size: var(--t-small); font-weight: 500; color: var(--muted); text-align: center;
}
.drawing-grid { max-width: 100%; }
@media (max-width: 1023px) { .range-diagram { margin-top: var(--s-6); } }

/* Fact cards (FAQ section visual: bordered icon tiles, the same recipe as the dimension drawings) */
.fact-cards { margin-bottom: var(--s-4); }
.fact-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  margin: 0; padding: var(--s-5) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
}
.fact-card svg { width: 32px; height: 32px; color: var(--action); flex: none; }
.fact-card figcaption { margin-top: var(--s-3); font-size: var(--t-small); font-weight: 500; color: var(--muted); }

/* Small real-use icon rows (FAQ + quote + config sections: a UI/icon visual, per house rule) */
.icon-row { display: flex; gap: var(--s-6); margin-bottom: var(--s-4); flex-wrap: wrap; }
.icon-row__item { display: flex; align-items: center; gap: var(--s-2); color: var(--muted); font-size: var(--t-small); font-weight: 500; }
.icon-row__item svg { width: 22px; height: 22px; flex: none; color: var(--action); }
.icon-row--col { flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--s-6); margin: 0; padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); min-width: 0; }
.icon-row--col .icon-row__item { font-size: var(--t-body); min-width: 0; }
.icon-row--col .icon-row__item svg { width: 26px; height: 26px; }
@media (max-width: 639px) { .icon-row--col .icon-row__item { font-size: var(--t-small); } }
.config-visual { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.config-visual__photo { height: 260px; }
.config-visual .icon-row--col { gap: var(--s-4); }

/* Quote form */
.quote-form { display: grid; gap: var(--s-4); }
.quote-form .field-row { grid-template-columns: 1fr 1fr; }
.form-honeypot { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.consent-check { display: flex; align-items: flex-start; gap: var(--s-2); color: var(--muted); font-size: var(--t-small); font-weight: 400; cursor: pointer; }
.consent-check input { width: 18px; height: 18px; flex: 0 0 18px; margin: 2px 0 0; accent-color: var(--action); }
.consent-check a { color: var(--action); text-decoration: underline; text-underline-offset: 3px; }
.form-success { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-5); border: 2px solid var(--action); border-radius: var(--r-lg); background: var(--surface); }
.form-success[hidden] { display: none; }
.form-success h3 { margin: 0 0 var(--s-1); }
.form-success p { margin: 0; color: var(--muted); }

@media (min-width: 1024px) {
  .hero--product .hero__head { row-gap: var(--s-6); }
}
#range { padding-top: calc(var(--padt) + var(--s-6)); }
@media (max-width: 639px) {
  #range { padding-top: calc(var(--padt) + var(--s-8)); }
  #specs { padding-bottom: calc(var(--padb) + var(--s-9)); }
  #usecases { padding-bottom: calc(var(--padb) + var(--s-7)); }
}
@media (max-width: 639px) {
  .field-row, .quote-form .field-row { grid-template-columns: 1fr; }
  /* keep the product hero to one screen at 390: shorten the lead, tighten the stage */
  .hero--product .hero-notice { display: none; }
  .hero--product .hero__lead { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero--product .hero__stage { aspect-ratio: 3 / 2 !important; }
}

/* nav phone link: drop it before the hamburger would be pushed off-screen */
@media (max-width: 374px) { .nav__actions > .nav__link { display: none; } }
