/* Shared visual contract, approved 30 September 2026. Layout stays in template CSS. */
:root {
  color-scheme: dark;
  --page: #12171a;
  --page-soft: #171d20;
  --surface: #212629;
  --surface-raised: #2a3033;
  --surface-strong: #2a3033;
  --line: #41494d;
  --line-strong: #697378;
  --text: #e4e5e6;
  --soft: #e4e5e6;
  --muted: #a8afb2;
  --text-muted: #a8afb2;
  --accent: #fc801e;
  --accent-hover: #e96e12;
  --accent-3: #ffaa61;
  --accent-text: #12171a;
  --focus: #ffaa61;
  --danger: #ffb4a6;
  --radius-card: 6px;
  --radius-panel: 6px;
  --radius-xl: 6px;
  --radius-control: 4px;
  --shadow: inset 0 1px 0 rgb(255 255 255 / 8%), 0 4px 16px rgb(0 0 0 / 12%);
  --panel-finish: linear-gradient(135deg, #2a3033 0%, #212629 48%, #191f22 100%);
  --font-main: Inter, "Segoe UI", Arial, sans-serif;
  --font-display: Inter, "Segoe UI", Arial, sans-serif;
  --font-heading: Inter, "Segoe UI", Arial, sans-serif;
  --content: 1320px;
  --gutter: clamp(16px, 2.7vw, 38px);
  --content-gutter: clamp(16px, 2.7vw, 38px);
  --header-height: 76px;
}

html { background: var(--page); }
body {
  min-width: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-main);
}
button, input, textarea, select { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--font-heading); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.site-header { background: rgb(18 23 26 / 96%); border-color: var(--line); }
.brand__mark, .legal-brand img, .not-found-brand img { display: none; }
.brand__name { font-size: 23px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.brand__name-accent { color: var(--accent); }
.legal-brand, .not-found-brand { font-size: 23px; letter-spacing: -.025em; }
.brand__note, .brand__tagline { color: var(--muted); font-size: 10px; line-height: 1.3; }
.header-cta, .btn, .form-submit { min-height: 46px; border-radius: var(--radius-control); }
.header-cta, .btn--primary, .form-submit { background: var(--accent); color: var(--accent-text); }
.header-cta:hover, .btn--primary:hover, .form-submit:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn--ghost { border-color: var(--line-strong); background: rgb(18 23 26 / 80%); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); background: var(--surface-raised); }
.mobile-menu__panel, .mobile-action-dock { background: var(--page-soft); border-color: var(--line); }
.call-modal, .case-modal, .request-modal { border-color: var(--line); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.call-option { border-color: var(--line); border-radius: var(--radius-control); background: var(--page-soft); }
.call-option:hover, .call-option:focus-visible { border-color: var(--accent); background: var(--surface-raised); }
.call-modal__close, .case-modal__close, .request-modal__close { min-width: 44px; min-height: 44px; }
.form-row input, .form-row textarea, .form-row select { min-height: 48px; border-color: var(--line-strong); border-radius: var(--radius-control); background: var(--page-soft); color: var(--text); }
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--muted); }
.form-row input[aria-invalid="true"], .form-row textarea[aria-invalid="true"] { border-color: var(--danger); }
.channel-choice__options span { min-height: 44px; border-color: var(--line-strong); border-radius: var(--radius-control); }
.channel-choice__options input:checked + span { border-color: var(--accent); background: var(--surface-raised); color: var(--text); }
.legal-consent input { accent-color: var(--accent); }
.form-note, .form-note a, .legal-consent, .legal-consents__legend { color: var(--muted); }
.form-note a, .legal-consent a { text-decoration-color: var(--accent); text-underline-offset: 3px; }
.site-footer { border-color: var(--line); background: var(--page); }

/* Home: the lacquer treatment connects the evidence and service cards. */
body[data-page-type="home"] :is(.case-summary, .service-direction, .about-card, .news-card) {
  border-color: var(--line);
  border-radius: var(--radius-card);
  background: var(--panel-finish);
  box-shadow: var(--shadow);
}
body[data-page-type="home"] .case-summary__action { min-height: 44px; transition-duration: 160ms; }
body[data-page-type="home"] .trust-card > span { border-color: var(--line-strong); border-radius: var(--radius-control); }
body[data-page-type="home"] .faq-item { border-radius: var(--radius-control); background: var(--surface); }
body[data-page-type="home"] .faq-item[open] { border-color: var(--line-strong); background: var(--surface-raised); }
body[data-page-type="home"] .faq-item summary { min-height: 44px; display: flex; align-items: center; }
body[data-page-type="home"] :is(.faq-expand, .about-extra > summary, .works-expand, .news-expand) { min-height: 44px; }
body[data-page-type="home"] .legal-consent { font-size: 12px; line-height: 1.5; }
body[data-page-type="home"] .form-note { font-size: 12px; line-height: 1.5; }
body[data-page-type="home"] :is(.btn, .form-submit, .mobile-service-list summary, .mobile-service-list a) { min-height: 44px; }

/* Service templates retain their anchors, side navigation and request dialog. */
body[data-page-type="service"] { background: var(--page); font-size: 16px; }
body[data-page-type="service"] .site-header { grid-template-columns: max-content minmax(0, 1fr) max-content; }
body[data-page-type="service"] .header-actions { justify-self: end; }
body[data-page-type="service"] .header-phone { min-height: 44px; }
body[data-page-type="service"] .header-phone__number { font-size: 14px; }
body[data-page-type="service"] .service-hero { padding-bottom: 52px; }
body[data-page-type="service"] .service-hero::after {
  background: linear-gradient(90deg, rgb(18 23 26 / 96%) 0 38%, rgb(18 23 26 / 76%) 64%, rgb(18 23 26 / 88%) 100%), linear-gradient(0deg, var(--page), transparent 52%);
}
body[data-page-type="service"] .hero__lead { font-size: clamp(16px, 1.2vw, 18px); line-height: 1.6; }
body[data-page-type="service"] .page-section { padding-block: clamp(48px, 5vw, 72px); }
body[data-page-type="service"] .service-boundary { border-color: var(--line-strong); background: var(--surface); color: var(--soft); font-weight: 600; }
body[data-page-type="service"] :is(.service-hero__summary, .service-section-note, .service-wide-card) {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel-finish);
  box-shadow: var(--shadow);
}
body[data-page-type="service"] :is(.service-card__index, .service-info-card > span, .service-steps li > span) { color: var(--accent); }
body[data-page-type="service"] :is(.service-inline-link, .service-breadcrumbs a) { color: var(--focus); text-decoration-color: var(--focus); }
body[data-page-type="service"] :is(.service-inline-link, .service-breadcrumbs a):hover { color: var(--text); }
body[data-page-type="service"] .service-breadcrumbs a { min-height: 44px; display: inline-flex; align-items: center; }
body[data-page-type="service"] .service-breadcrumbs { align-items: center; }
body[data-page-type="service"] :is(.service-content-grid, .service-steps, .contact-copy, .contact-links) { background: var(--surface); border-color: var(--line); border-radius: var(--radius-card); }
body[data-page-type="service"] .faq-item { margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); }
body[data-page-type="service"] .faq-item summary { min-height: 48px; padding: 14px 44px 14px 18px; }
body[data-page-type="service"] .faq-item > p { padding: 0 18px 18px; }
body[data-page-type="service"] .faq-item[open] { border-color: var(--line-strong); background: var(--surface-raised); }
body[data-page-type="service"] [data-local-facts] { border-color: var(--line); background: var(--surface); }
body[data-page-type="service"] .service-related a:hover { background: var(--surface-raised); }
body[data-page-type="service"] .request-modal__close:hover { background: var(--surface-raised); }
body[data-page-type="service"] .site-footer { padding-block: 32px; }

/* Documents and case galleries share the same palette without commercial-page density. */
.legal-page { padding-top: 40px; }
.legal-page .page-shell { width: min(960px, calc(100% - var(--content-gutter) * 2)); }
.case-page .page-shell { width: min(1200px, calc(100% - var(--content-gutter) * 2)); }
.legal-page h1 { font-size: clamp(28px, 3.5vw, 46px); line-height: 1.14; color: var(--text); }
.legal-page h2 { color: var(--text); }
.legal-header, .legal-document, .legal-requisites { border-color: var(--line); border-radius: var(--radius-card); background: var(--surface); box-shadow: none; backdrop-filter: none; }
.legal-header { background: var(--panel-finish); box-shadow: var(--shadow); }
.legal-header p { font-weight: 400; line-height: 1.6; }
.legal-page a { font-weight: 600; text-decoration-color: var(--focus); }
.legal-page .legal-brand { font-weight: 800; }
.legal-nav a, .case-page .legal-nav span[aria-current="page"], .case-related a { border-color: var(--line-strong); border-radius: var(--radius-control); background: var(--page-soft); font-weight: 600; }
.legal-nav a:hover, .case-related a:hover { border-color: var(--accent); background: var(--surface-raised); }
.legal-warning { border-color: var(--line-strong); border-radius: var(--radius-control); background: var(--page-soft); color: var(--text); font-weight: 600; }
.legal-requisites dd, .legal-requisites dt { font-weight: 500; }
.case-gallery figure { border-color: var(--line); border-radius: var(--radius-card); background: var(--page-soft); }
.case-gallery figcaption { color: var(--muted); font-weight: 600; }
.legal-header h1 { width: auto; max-width: 100%; }
.legal-document, .legal-requisites { font-size: 16px; }

body.page-not-found { display: grid; min-height: 100dvh; place-items: center; padding: 24px; }
.page-not-found main { width: min(100%, 640px); }
.page-not-found p { color: var(--muted); }
.page-not-found a:not(.not-found-brand) { border-color: var(--accent); border-radius: var(--radius-control); background: var(--accent); color: var(--accent-text); }
.page-not-found a:not(.not-found-brand):hover { background: var(--accent-hover); }
.page-not-found .not-found-brand { color: var(--text); }

@media (max-width: 900px) {
  body[data-page-type="service"] .site-header { grid-template-columns: minmax(0, 1fr) max-content; }
  body[data-page-type="service"] .header-actions { display: none; }
  body[data-page-type="service"] .service-hero::after { background: linear-gradient(180deg, rgb(18 23 26 / 88%), rgb(18 23 26 / 94%)); }
}
@media (max-width: 620px) {
  .brand__name { font-size: 21px; }
  .mobile-call, .mobile-menu__toggle { min-width: 44px; width: 44px; min-height: 44px; height: 44px; border-radius: var(--radius-control); }
  body[data-page-type="service"] .hero__title { font-size: clamp(30px, 8vw, 39px); }
  body[data-page-type="service"] .hero__actions .btn { white-space: normal; }
  body[data-page-type="service"] .service-hero { padding-bottom: 36px; }
  body[data-page-type="home"] .case-summary { padding: 10px; }
  .legal-page { padding-top: 24px; }
  .legal-header, .legal-document, .legal-requisites { padding: 20px; }
  .legal-page .legal-header h1 { width: auto; max-width: 100%; font-size: clamp(26px, 7vw, 32px); line-height: 1.14; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
