/* Плавные состояния управления. */
.button, .menu-control, .mega-toggle, .nav-links > a, .footer-nav a, .form-input, .info-button { transition: color .4s ease, background-color .4s ease, border-color .4s ease, box-shadow .4s ease, transform .5s ease; }
.products-intro .button { margin-top: 24px; }
.form-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Мегаменю без разрыва между пунктом и карточками. */
.mega-menu { left: 0; right: 0; padding: 28px 32px; border: 0; transform: translateY(-10px); transition: opacity .4s ease, transform .5s ease, visibility .4s; }
.nav-mega.is-open .mega-menu { transform: translateY(0); }
.mega-grid { max-width: 1376px; margin-inline: auto; }
.mega-card { position: relative; overflow: hidden; isolation: isolate; border: 0; transition: background-color .5s ease, color .5s ease; }
.mega-card h3 { transition: opacity .5s ease, transform .6s ease; }
.mega-card > .mega-title-motion { position: absolute; left: 0; top: 61%; width: max-content; max-width: none; margin: 0; opacity: 0; color: #15120b; font-size: 80.5px; line-height: .95; font-weight: 400; letter-spacing: -2px; white-space: nowrap; text-transform: none; pointer-events: none; transition: opacity .55s ease; animation: mega-pan 13s linear infinite; animation-play-state: paused; }
@keyframes mega-pan { from { transform: translate3d(350px, -50%, 0); } to { transform: translate3d(calc(-100% - 40px), -50%, 0); } }
@media (hover: hover) and (pointer: fine) {
  .mega-card:hover h3, .mega-card:focus-visible h3 { opacity: 0; transform: scale(1.08); }
  .mega-card:hover > .mega-title-motion, .mega-card:focus-visible > .mega-title-motion { opacity: 1; color: #111; animation-play-state: running; }
  .mega-card:hover > .mega-category, .mega-card:focus-visible > .mega-category { opacity: 1; color: #111; }
}

/* Небольшой зум единственной фотографии. */
.photo-stage { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; isolation: isolate; background: #080808; }
.photo-stage .photo-current { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform: scale(1); transform-origin: center; transition: transform 2.2s cubic-bezier(.2,.6,.25,1); }
.product-visual:hover .product-image { transform: none; }
@media (hover: hover) and (pointer: fine) {
  .product-visual:hover .photo-current, .photo-stage:hover .photo-current { transform: scale(1.045); }
}
.product-visual > .sale-ribbon, .product-visual > .image-badge, .product-visual > .image-chips { z-index: 4; }
.detail-photo { mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }

/* Обратный отсчет действует до общего срока акции. */
.image-badge .badge-countdown { margin-top: 10px; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.promotion-clock { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 12px 14px; margin-bottom: 22px; border: 1px solid #456a50; color: #aedbb8; background: #183a2226; font-size: 14px; }
.promotion-clock time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip-discount { white-space: nowrap; }

/* Полноширинная золотая полоса. */
.gold-capture-band { position: relative; z-index: 1; color: #17130b; background: linear-gradient(112deg, #f1db9b, #cfaa59 62%, #e5c77e); }
.gold-capture-band .gold-capture { margin-block: 0; padding-block: 52px; border: 0; background: transparent; }
.capture-label { margin-bottom: 24px; color: #4d3e20; font-size: 14px; letter-spacing: 1.4px; text-transform: uppercase; }
.gold-capture-band .gold-capture > div > p:last-child { color: #4d3e20; }
.gold-capture-band .gold-capture .request-form { border: 1px solid #f8e4b0; }

/* Пошаговая заявка помещается в высоту окна. */
.lead-dialog.is-paper { width: min(690px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: hidden; }
.is-paper .lead-panel { max-height: calc(100dvh - 26px); padding: 28px 32px 20px; }
.is-paper .lead-panel > .eyebrow, .is-paper .lead-intro, .is-paper .lead-panel > .service-summary { display: none; }
.is-paper .lead-panel h2 { padding-right: 30px; font-size: 30px; }
.lead-panel .selected-product { display: block; margin-top: 10px; color: var(--gold); font-size: 22px; line-height: 1.35; }
.lead-panel .selected-product:empty { display: none; }
.is-paper .selected-product { margin-top: 7px; max-width: 100%; font-size: 18px; line-height: 1.4; white-space: normal; overflow: visible; text-overflow: clip; }
.wizard-form { min-width: 0; }
.wizard-form .request-fields { display: block; }
.wizard-progress { margin-block: 20px 22px; }
.wizard-progress > div { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; font-size: 14px; line-height: 1.4; color: #786b4d; }
.wizard-progress strong { font-weight: 500; color: #3f3829; }
.wizard-progress progress { display: block; appearance: none; width: 100%; height: 3px; border: 0; background: #dcd5c3; accent-color: #aa8644; }
.wizard-progress progress::-webkit-progress-bar { background: #dcd5c3; }
.wizard-progress progress::-webkit-progress-value { background: #aa8644; transition: width .5s ease; }
.form-step { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-step[data-form-step="client"], .form-step[data-form-step="details"] { grid-template-columns: minmax(0, 1fr); }
.wizard-form .form-field { gap: 8px; }
.wizard-form .form-field > label { font-size: 14px; }
.wizard-form .form-input { min-height: 48px; padding: 11px 12px; font-size: 16px; }
.wizard-form textarea.form-input { min-height: 66px; max-height: 90px; resize: none; }
.wizard-form .form-consent { font-size: 14px; line-height: 1.5; }
.wizard-form .client-kind, .wizard-form .client-kind legend { font-size: 14px; }
.wizard-actions { display: flex; gap: 12px; margin-top: 22px; }
.wizard-actions .button { flex: 1; min-width: 0; min-height: 48px; padding: 11px 16px; }
.wizard-form .form-status { font-size: 14px; line-height: 1.45; margin-top: 12px; }
.is-paper .dialog-footer { margin-top: 16px; padding-top: 12px; font-size: 13px; }
.is-paper .dialog-footer a { font-size: 13px; }
.standalone-request .wizard-form, .detail-request .wizard-form { padding: 28px; }
.contacts .request-form { background: #151510; }
.contacts .quick-note { font-size: 14px; }

/* Темная тема пошаговых форм и отступ стрелки списка. */
.lead-dialog.is-paper, .paper-form { color-scheme: dark; color: var(--text); background: #151510; }
.is-paper .dialog-close { color: var(--gold); background: #151510ee; }
.is-paper .selected-product, .is-paper .dialog-footer a, .paper-form .form-consent a { color: var(--gold); }
.is-paper .dialog-footer, .paper-form .form-consent { color: #bfb7a6; }
.paper-form .form-field > label, .paper-form .client-kind legend { color: var(--text); }
.paper-form .form-input { color: var(--text); background: #0d0e0b; border-color: #9f864d; }
.paper-form .form-input::placeholder { color: #99998f; }
.paper-form .form-input:hover, .paper-form .form-input:focus { color: var(--text); background: #1b1c17; border-color: #fff; }
.paper-form .form-status { color: var(--gold-hover); }
.wizard-progress > div { color: #b8a983; }
.wizard-progress strong { color: #ded7c6; }
.wizard-progress progress, .wizard-progress progress::-webkit-progress-bar { background: #3c382b; }
.form-input:is(select) { appearance: none; padding-right: 44px; }
.form-field:has(> select) { position: relative; }
.form-field:has(> select)::after { content: ''; position: absolute; right: 18px; bottom: 21px; width: 7px; height: 7px; border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(45deg); pointer-events: none; }

/* Полупрозрачная фактура и три плоскости декора. */
body { position: relative; isolation: isolate; background: #080808; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url('../../images/chernyy_gofrokarton_tekstura.webp') center var(--texture-y, 0px) / 627px 627px repeat; opacity: .065; }
.products, .contacts { position: relative; isolation: isolate; overflow: clip; }
.ambient-art { top: 18%; width: clamp(90px, 11vw, 175px); opacity: .13; filter: blur(1.1px); transform: translate3d(0, var(--parallax-y, 0px), 0); }
.ambient-art img { width: 100%; height: auto; }
.ambient-left { left: -42px; }
.ambient-right { right: -42px; }
.ambient-deep { top: 13%; width: 100px; opacity: .09; filter: blur(3px); }
.ambient-mid { top: 26%; width: 150px; opacity: .13; filter: blur(1px); }
.ambient-front { top: 35%; width: clamp(240px, 26vw, 390px); opacity: .12; filter: none; }
.ambient-front.ambient-left { left: -160px; }
.ambient-front.ambient-right { right: -160px; }
.process .ambient-front { width: clamp(480px, 52vw, 780px); right: -320px; }
.ambient-small { top: 70%; width: 80px; opacity: .11; filter: blur(1.8px); }
.ambient-small img { transform: rotate(32deg); }

/* Единые контакты и ссылки на документы. */
.contact-details { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.contact-label { flex: 0 0 100%; }
.contact-phone { font-size: clamp(18px, 1.65vw, 24px); padding-inline: 14px; white-space: nowrap; }
.footer-grid { grid-template-columns: 1.15fr .65fr 1.25fr 1.1fr; gap: 32px; }
.footer-contacts > a { white-space: nowrap; }
.office-address { max-width: 350px; line-height: 1.6; }
.office-address > span { display: block; margin-bottom: 6px; color: var(--gold); font-size: 13px; }
.footer-documents { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 22px; max-width: 760px; font-size: 13px; }
.cookie-notice { position: fixed; right: 24px; bottom: 20px; z-index: 120; width: min(470px, calc(100% - 40px)); padding: 18px 20px; display: flex; align-items: center; gap: 20px; border: 1px solid #837044; background: #15140fef; box-shadow: 0 8px 32px #0006; backdrop-filter: blur(20px); opacity: 0; transform: translateY(24px); transition: opacity .4s ease, transform .45s ease, visibility .4s; }
.cookie-notice.is-visible { opacity: 1; transform: translateY(0); }
.cookie-notice p { color: #c4bcaa; font-size: 13px; line-height: 1.5; }
.cookie-notice a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.cookie-notice .button { flex: 0 0 auto; min-height: 44px; padding: 10px 18px; }
.modal-open .cookie-notice, .menu-open .cookie-notice { opacity: 0; visibility: hidden; pointer-events: none; }

/* Мобильное меню и форма на небольших экранах. */
.site-header .brand { width: 291px; }
@media (min-width: 1100px) {
  .hero-art { max-width: none; width: 100%; margin: 0; }
  .hero-art picture { height: 100%; }
  .hero-art img { width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: center 65%; }
}
@media (min-width: 1280px) and (max-width: 1439px) { .site-header .brand { width: 246px; } }
@media (max-width: 1099px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; } }
@media (max-width: 1279px) {
  .site-header .brand { width: 246px; }
  .menu-control { border: 0; background: transparent; }
  .menu-control span { transition: transform .45s ease, opacity .3s ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mobile-menu-header .menu-close { display: none; }
  .js .main-nav { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; width: 100%; height: 100dvh; padding: 0 40px 32px; overflow-y: auto; background: var(--background); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-12px); transition: opacity .35s ease, transform .45s ease, visibility .35s; }
  .js .main-nav.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
  .mega-menu { position: static; display: block; padding: 0; max-height: 0; overflow: hidden; transform: none; transition: max-height .55s ease, padding .45s ease, opacity .4s ease, visibility .4s; }
  .nav-mega:hover .mega-menu, .nav-mega:focus-within .mega-menu { display: block; }
  .nav-mega.is-open .mega-menu { max-height: 900px; padding-block: 16px 24px; }
  .mega-card > .mega-title-motion { display: none; }
  .mega-card h3 { opacity: 1; }
}
@media (max-width: 767px) {
  .js .main-nav { padding-inline: 24px; }
  .gold-capture-band .gold-capture { padding-block: 38px; padding-inline: 24px; }
  .capture-label { margin-bottom: 20px; }
  .is-paper .lead-panel { padding: 24px 22px 18px; }
  .is-paper .lead-panel h2 { font-size: 27px; }
  .wizard-progress { margin-block: 16px 18px; }
  .wizard-progress > div { gap: 10px; font-size: 13px; }
  .form-step, .wizard-form .legal-fields { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .wizard-form .form-input { font-size: 16px; }
  .wizard-actions { margin-top: 18px; gap: 10px; }
  .wizard-actions .button { padding-inline: 10px; }
  .ambient-front { width: 240px; }
  .ambient-deep { width: 70px; }
  .ambient-mid { width: 100px; }
  .ambient-small { width: 60px; }
  .ambient-front.ambient-left { left: -155px; }
  .ambient-front.ambient-right { right: -155px; }
  .process .ambient-front { width: 480px; right: -310px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .contact-details { gap: 10px; }
  .contact-phone { font-size: clamp(14px, 4.2vw, 18px); padding: 10px 8px; }
  .footer-documents { flex-direction: column; align-items: flex-start; gap: 12px; }
  .cookie-notice { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100% - 24px); padding: 16px; gap: 14px; }
  .cookie-notice p { font-size: 14px; }
}
@media (max-width: 359px) { .site-header .brand { width: 213px; } }
@media (max-height: 600px) {
  .is-paper .lead-panel { padding-block: 18px 12px; }
  .is-paper .lead-panel h2 { font-size: 25px; }
  .wizard-progress { margin-block: 12px; }
  .wizard-form .form-input { min-height: 42px; padding-block: 9px; }
  .wizard-form .form-field:has(> select)::after { bottom: 18px; }
  .wizard-form textarea.form-input { min-height: 52px; max-height: 52px; }
  .wizard-form .form-consent { font-size: 13px; line-height: 1.4; }
  .wizard-form .form-field { gap: 6px; }
  .form-step { gap: 12px; }
  .wizard-actions { margin-top: 14px; }
  .wizard-actions .button { min-height: 44px; padding-block: 10px; }
  .is-paper .dialog-footer { margin-top: 12px; padding-top: 10px; }
}
@media (max-height: 420px) and (min-width: 600px) {
  .is-paper .lead-panel { padding: 12px 26px; }
  .is-paper .selected-product { display: block; margin-top: 4px; font-size: 14px; }
  .wizard-progress { margin-block: 8px 10px; }
  .form-step[data-form-step="client"] { grid-template-columns: 1fr 1fr; }
  .wizard-form .client-kind { grid-column: auto; }
  .wizard-form .client-kind legend { margin-bottom: 6px; }
  .is-paper .dialog-footer span { display: none; }
  .is-paper .dialog-footer { justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, .ambient-art { transform: none !important; }
  .mega-card > .mega-title-motion { display: none; }
  .mega-card:hover h3 { opacity: 1; transform: none; }
  .product-visual:hover .photo-current, .photo-stage:hover .photo-current { transform: none; }
}
