/* Второй раунд правок: белая основа, бежевые карточки, один зелёный акцент. */
:root {
  --pine-deep: var(--pine);
  --header-height: 84px;
}
html { scroll-padding-top: calc(var(--header-height) + 24px); }
main [id] { scroll-margin-top: 0; }
.header__inner { gap: 20px; }
.header__logo-text { font-size: 21px; }
.header__nav { gap: 4px; }
.nav-item.has-sub { display: flex; align-items: center; }
.nav-item > a { font-size: 13px; letter-spacing: 0; text-transform: none; padding: 12px 9px; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 36px; color: var(--gold-soft); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.nav-toggle:hover { background: rgba(255,255,255,.08); }
.nav-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.header__actions { gap: 14px; }
.mobile-menu { padding-top: calc(var(--header-height) + 22px); height: 100dvh; overscroll-behavior: contain; }
body.menu-open #cw-trigger, body.menu-open #cw-win { display: none; }
body.dmodal-open #cw-trigger, body.dmodal-open #cw-win { display: none; }

.home-hero { position: relative; isolation: isolate; background: var(--white); overflow: hidden; padding-top: var(--header-height); }
.home-hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1.3fr) minmax(0,.65fr); column-gap: clamp(20px,3vw,68px); align-items: center; min-height: clamp(650px,calc(100svh - var(--header-height) - 72px),850px); }
.home-hero__values { position: absolute; inset: calc(var(--header-height) + 42px) 0 38px; z-index: 0; display: grid; grid-template-columns: 1fr 1fr; align-content: space-between; gap: 50px 60px; padding: 0 var(--gutter); color: rgba(36,56,47,.075); font-family: var(--serif); font-size: clamp(44px,5.3vw,100px); font-weight: 500; line-height: 1; pointer-events: none; user-select: none; }
.home-hero__values span:nth-child(even) { text-align: right; }
.home-hero__content { position: relative; z-index: 2; padding: 56px 0; }
.home-hero h1 { font-size: clamp(34px,3.4vw,62px); line-height: 1.07; margin-bottom: 28px; color: var(--pine); }
.home-hero__description { font-size: clamp(14px,1.15vw,17px); line-height: 1.75; max-width: 480px; margin-bottom: 30px; }
.home-hero__phone { display: inline-block; text-decoration: none; margin-bottom: 24px; }
.home-hero__phone span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.home-hero__phone strong { display: block; font-family: var(--serif); font-size: clamp(28px,2.65vw,44px); font-weight: 600; line-height: 1.1; white-space: nowrap; }
.home-hero__phone:hover strong { color: var(--gold); }
.home-hero__action { max-width: 440px; width: 100%; padding: 20px 25px; font-size: 14px; line-height: 1.5; text-transform: none; letter-spacing: 0; }
.home-hero__portrait { position: relative; z-index: 1; align-self: stretch; display: flex; align-items: end; justify-content: center; padding-top: 40px; }
.home-hero__portrait img { width: 100%; max-width: 660px; height: auto; max-height: 780px; object-fit: contain; object-position: bottom; }
.home-hero__facts { position: relative; z-index: 2; list-style: none; display: grid; gap: 25px; padding: 40px 0; }
.home-hero__facts li { padding-bottom: 20px; border-bottom: 1px solid var(--gold-line); }
.home-hero__facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.home-hero__facts strong { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: clamp(38px,3.6vw,58px); font-weight: 500; line-height: 1; margin-bottom: 10px; }
.home-hero__facts span { font-size: 13px; line-height: 1.6; }
.home-hero__facts a { text-decoration: none; }
.home-hero__facts a:hover { color: var(--gold); }
.home-hero__facts strong svg { width: 23px; height: 23px; color: var(--gold); }
.home-hero__membership > svg { width: 42px; height: 42px; color: var(--gold); margin-bottom: 10px; }
.home-hero__membership span { display: block; }

/* Карточки направлений повторяют светлое оформление реестра дел. */
.dcol { background: var(--card); border-radius: 18px; border-color: var(--gold-line); box-shadow: inset 0 0 0 5px var(--white); }
.dcol::before { display: none; }
.dcol:hover { background: var(--card); transform: translateY(-3px); border-color: var(--gold); box-shadow: inset 0 0 0 5px var(--white),0 10px 24px rgba(36,56,47,.07); }
.dcol:hover .dcol__title { color: var(--pine); }
.dcol:hover .dcol__list li { color: var(--muted); }
.dcol__list li { border-bottom-style: solid; border-bottom-color: var(--gold-line); }
.dcol__more { color: var(--pine); }
.dcol__title { font-size: clamp(24px,2vw,32px); }
.footer__brand img { width: 188px; max-width: 100%; height: auto; margin-bottom: 20px; }
.saves__title { font-size: clamp(30px,3vw,46px); margin-bottom: 36px; max-width: 1100px; }
.factors__list { grid-auto-flow: row; }

.certificates { margin-top: 72px; padding-top: 54px; border-top: 1px solid var(--gold-line); }
.certificates .sect { margin-bottom: 36px; }
.certificates__grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 22px; }
.certificate { display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--gold-line); border-radius: 16px; padding: 18px; text-align: left; color: var(--ink); font-family: var(--sans); cursor: pointer; transition: border-color .2s,box-shadow .2s; }
.certificate:hover { border-color: var(--gold); box-shadow: 0 8px 22px rgba(36,56,47,.07); }
.certificate__image { display: flex; align-items: center; justify-content: center; height: 190px; margin-bottom: 20px; }
.certificate__image img { width: 100%; height: 100%; object-fit: contain; }
.certificate__kind { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.certificate__title { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.2; margin-bottom: 18px; }
.certificate__open { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--gold-line); font-size: 11px; font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
body.document-open { overflow: hidden; }
.document-viewer { position: fixed; inset: 0; width: min(1180px,calc(100vw - 48px)); height: calc(100dvh - 48px); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 18px; background: var(--white); color: var(--ink); }
.document-viewer[open] { display: flex; flex-direction: column; }
.document-viewer::backdrop,.max-contact::backdrop { background: rgba(24,37,30,.75); }
.document-viewer__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 24px; border-bottom: 1px solid var(--gold-line); }
.document-viewer__toolbar h2 { font-size: 25px; }
.document-viewer__toolbar p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.document-viewer__close,.max-contact__close { flex-shrink: 0; width: 40px; height: 40px; border: 1px solid var(--gold-line); border-radius: 50%; color: var(--pine); background: var(--white); font-size: 27px; cursor: pointer; }
.document-viewer__image { flex: 1; min-height: 0; overflow: auto; padding: 20px; background: var(--paper); display: flex; justify-content: center; }
.document-viewer__image img { width: 100%; height: 100%; object-fit: contain; }
.document-viewer.is-zoomed .document-viewer__image { display: block; }
.document-viewer.is-zoomed .document-viewer__image img { height: auto; max-width: none; width: 1600px; }
.document-viewer__controls { display: flex; gap: 16px; align-items: center; justify-content: center; padding: 14px 20px; border-top: 1px solid var(--gold-line); }
.document-viewer__controls button,.document-viewer__controls a { padding: 9px 14px; border: 1px solid var(--gold-line); border-radius: 8px; background: var(--white); color: var(--pine); font-family: var(--sans); font-size: 13px; text-decoration: none; cursor: pointer; }
.document-viewer__controls button:hover,.document-viewer__controls a:hover { background: var(--paper); }
.max-contact { position: fixed; inset: 0; margin: auto; padding: 38px; width: min(540px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); border: 0; border-radius: 18px; color: var(--ink); }
.max-contact h2 { padding-right: 42px; margin-bottom: 24px; font-size: 34px; }
.max-contact p { margin-top: 16px; font-size: 14px; }
.max-contact__close { position: absolute; right: 16px; top: 16px; }
.max-contact__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.max-contact__actions .btn { font-size: 11px; padding: 15px 18px; letter-spacing: .04em; }
.max-contact__status { color: var(--pine); min-height: 22px; }

@media (min-width:1081px) and (max-width:1536px) {
  .header__logo img { width: 68px; }
  .header__logo { gap: 10px; }
  .header__logo-text { font-size: 19px; }
  .header__inner { gap: 14px; }
  .nav-item > a { font-size: 12px; padding: 12px 6px; }
  .header__phone { font-size: 20px; }
  .header__cta { display: none; }
}
@media (max-width:1100px) {
  .home-hero__inner { grid-template-columns: minmax(0,1fr) minmax(0,1fr); min-height: 0; gap: 0 24px; }
  .home-hero__content { padding: 64px 0 36px; }
  .home-hero__portrait { padding-top: 36px; }
  .home-hero__portrait img { max-height: 600px; }
  .home-hero__facts { grid-column: 1 / -1; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; padding: 24px 0 28px; border-top: 1px solid var(--gold-line); }
  .home-hero__facts li { border-bottom: 0; padding-bottom: 0; }
  .home-hero__facts strong { font-size: 40px; }
  .home-hero__membership > svg { height: 32px; margin-bottom: 8px; }
  .home-hero__facts span { font-size: 12px; }
  .home-hero__values { font-size: clamp(34px,6vw,58px); }
  .certificates__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:700px) {
  .home-hero__inner { grid-template-columns: 1fr; row-gap: 0; }
  .home-hero__portrait { grid-row: 1; height: 345px; padding-top: 24px; }
  .home-hero__portrait img { width: auto; max-width: 100%; height: 100%; }
  .home-hero__content { grid-row: 2; padding: 26px 0 30px; }
  .home-hero h1 { font-size: 38px; margin-bottom: 20px; }
  .home-hero__description { font-size: 14px; margin-bottom: 22px; }
  .home-hero__phone { margin-bottom: 20px; }
  .home-hero__phone strong { font-size: 32px; }
  .home-hero__action { max-width: none; font-size: 14px; padding: 18px 22px; }
  .home-hero__facts { grid-row: 3; grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 26px; }
  .home-hero__facts span { font-size: 12px; }
  .home-hero__membership > svg { height: 38px; }
  .home-hero__values { inset: calc(var(--header-height) + 24px) 0 auto; height: 300px; grid-template-columns: 1fr; gap: 36px; font-size: clamp(32px,8vw,52px); }
  .home-hero__values span:nth-child(n+4) { display: none; }
  .home-hero__values span:nth-child(2) { font-size: .75em; }
  .certificates { margin-top: 50px; padding-top: 38px; }
  .certificates__grid { gap: 14px; }
  .certificate { padding: 13px; }
  .certificate__image { height: 165px; }
  .certificate__title { font-size: 21px; }
  .document-viewer { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 12px; }
  .document-viewer__toolbar { padding: 14px; gap: 12px; }
  .document-viewer__toolbar h2 { font-size: 20px; }
  .document-viewer__image { padding: 10px; }
  .document-viewer__controls { gap: 7px; padding: 10px; flex-wrap: wrap; }
  .document-viewer__controls button,.document-viewer__controls a { padding: 9px 10px; font-size: 12px; }
}
@media (max-width:600px) {
  body.hero-action-visible #cw-trigger { visibility: hidden; pointer-events: none; }
  .header__inner { gap: 6px; padding-left: 16px; padding-right: 16px; }
  .header__logo { gap: 8px; min-width: 0; flex: 1; }
  .header__logo img { width: 44px; flex-shrink: 0; }
  .header__logo-text { font-size: 15px; white-space: normal; line-height: 1.15; }
  .header__actions { margin-left: 0; }
  .header__burger { margin-left: 0; flex-shrink: 0; width: 40px; }
  .cmodal__title { font-size: 29px; }
  .max-contact { padding: 28px 22px; }
  .footer__brand img { width: 180px; }
}
@media (max-width:380px) {
  .header__logo-text { font-size: 13px; }
  .home-hero__portrait { height: 310px; }
  .home-hero h1 { font-size: 34px; }
  .home-hero__phone strong { font-size: 29px; }
  .certificates__grid { grid-template-columns: 1fr; }
}
