/* ============================================================
   Ensley — ОБЩИЕ стили сайта (site.css)
   Хрома, кнопки, секции, подвал, cookie, drawer, интерьерный hero.
   Подключается после colors_and_type.css на КАЖДОЙ странице, кроме главной
   (у главной свой home.css с этими же базовыми классами).
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--milk); color: var(--fg); overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 1; transform: none; filter: none; }
.reveal.armed { opacity: 0; transform: translateY(24px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.reveal.armed.blur { transform: none; filter: blur(8px);
  transition: opacity 500ms var(--ease-out), filter 500ms var(--ease-out); }
.reveal.armed.in { opacity: 1; transform: none; filter: none; }
.reveal[data-delay="1"].armed { transition-delay: 90ms; }
.reveal[data-delay="2"].armed { transition-delay: 180ms; }
.reveal[data-delay="3"].armed { transition-delay: 270ms; }
.reveal[data-delay="4"].armed { transition-delay: 360ms; }
.reveal[data-delay="5"].armed { transition-delay: 450ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal.armed { opacity:1 !important; transform:none !important; filter:none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================ CHROME */
.promo-bar { background: var(--cream); color: var(--graphite); border-bottom: 1px solid var(--hairline);
  position: relative; z-index: 60; }
.promo-bar__in { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 36px;
  padding: 6px 44px; text-align: center; }
.promo-bar p { margin: 0; font-family: var(--font-body); font-size: 13.5px; line-height: 1.35; color: var(--fg-secondary); }
.promo-bar b { font-family: var(--font-ui); font-weight: 600; color: var(--graphite); letter-spacing: .02em; }
.promo-bar a { color: var(--olive); white-space: nowrap; }
.promo-bar a:hover { color: var(--graphite); }
.promo-bar__x { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none;
  cursor: pointer; color: var(--warm-gray); display: inline-flex; padding: 4px; border-radius: var(--r-full); }
.promo-bar__x:hover { color: var(--graphite); background: rgba(42,42,42,.05); }
.promo-bar.is-hidden { display: none; }

.hdr { position: sticky; top: 0; z-index: 50; transition: box-shadow 220ms; pointer-events: none; }
.hdr__bar { display: flex; justify-content: center; padding-block: 14px; transition: padding-block .3s var(--ease-out); }
.hdr.mini .hdr__bar { padding-block: 8px; }
.hdr__pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 4px;
  background: rgba(247,245,240,0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--hairline); border-radius: var(--r-pill); box-shadow: var(--shadow-sm);
  padding: 7px 7px 7px 18px; transition: box-shadow 220ms var(--ease-out), padding .3s var(--ease-out); }
.hdr.scrolled .hdr__pill { box-shadow: var(--shadow-card); }
.hdr.mini .hdr__pill { padding: 4px 5px 4px 15px; }
.logo { font-family: var(--font-display); font-weight: 400; font-size: 21px; text-transform: lowercase;
  color: var(--graphite); cursor: pointer; line-height: 1; letter-spacing: -.01em; background: none; border: none;
  padding: 0; margin-right: 14px; transition: color var(--dur-fast), font-size .3s var(--ease-out), margin-right .3s var(--ease-out); }
.logo:hover { color: var(--olive); }
.logo .reg { font-size: .42em; vertical-align: top; font-weight: 300; margin-left: 1px; }
.hdr.mini .logo { font-size: 18px; margin-right: 10px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { font-family: var(--font-ui); font-size: 14.5px; text-transform: lowercase; color: var(--graphite);
  transition: color 200ms, background 200ms, padding .3s var(--ease-out), font-size .3s var(--ease-out); position: relative; padding: 9px 16px; border-radius: var(--r-pill); }
.nav a:hover { color: var(--olive); background: rgba(157,170,134,0.14); }
.nav a.active { color: var(--olive); }
.nav a.active::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 2px;
  background: var(--olive); border-radius: 2px; transition: left .3s var(--ease-out), right .3s var(--ease-out); }
.nav a.nav--buy { background: var(--sage); color: #fff; }
.nav a.nav--buy:hover { background: var(--olive); color: #fff; }
.nav a.nav--buy.active::after { display: none; }
.hdr.mini .nav a { font-size: 13.5px; padding: 7px 12px; }
.hdr.mini .nav a.active::after { left: 12px; right: 12px; bottom: 3px; }
.menu-btn { display: none; background: none; border: none; cursor: pointer; color: var(--graphite); padding: 8px; border-radius: var(--r-full); }
.menu-btn:hover { background: rgba(42,42,42,.05); }

/* ============================================================ BUTTONS */
.btn { font-family: var(--font-ui); font-weight: 500; font-size: 15px; text-transform: lowercase; border-radius: var(--r-pill);
  padding: 13px 26px; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; line-height: 1;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast), color var(--dur-fast); }
.btn:active { transform: translateY(0) scale(.99); }
.btn--primary { background: var(--graphite); color: var(--cream); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-h); color: var(--cream); }
.btn--sage { background: var(--sage); color: #fff; }
.btn--sage:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-h); color: #fff; background: var(--olive); }
.btn--outline { background: transparent; color: var(--graphite); border-color: var(--border-soft); }
.btn--outline:hover { transform: translateY(-2px); background: var(--white); box-shadow: var(--shadow-sm); }
.btn--sm { padding: 10px 18px; font-size: 13.5px; }
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn--on-dark { background: var(--cream); color: var(--graphite); }
.btn--on-dark:hover { color: var(--graphite); background: #fff; transform: translateY(-2px); box-shadow: var(--shadow-card-h); }
.btn--outline-dark { background: transparent; color: var(--cream); border-color: var(--border-on-dark); }
.btn--outline-dark:hover { background: rgba(247,245,240,0.08); color: var(--cream); }
.btn--block { justify-content: center; width: 100%; }
.btn .arr { transition: transform var(--dur-fast) var(--ease-out); display: inline-block; }
.btn:hover .arr { transform: translateX(6px); }

.alink { font-family: var(--font-ui); font-size: 15px; color: var(--olive); display: inline-flex; align-items: center; gap: 7px;
  text-transform: lowercase; cursor: pointer; background: none; border: none; padding: 0; }
.alink .arr { transition: transform var(--dur-fast) var(--ease-out); }
.alink:hover { color: var(--graphite); }
.alink:hover .arr { transform: translateX(6px); }

/* ============================================================ SECTION SCAFFOLD */
.section { padding-block: var(--section-pad-y); position: relative; }
.section--milk { background: var(--milk); }
.section--cream { background: var(--cream); }
.section--beige { background: var(--beige); }
.section--white { background: var(--white); }
.section--sage { background: var(--sage-light); }
.section--dark { background: var(--graphite); color: var(--fg-on-dark); }
.section__head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 48px; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.section__head--center { justify-content: center; text-align: center; flex-direction: column; align-items: center; gap: 12px; }
.section__head--center h2 { margin: 0 auto; }
.section__sub { font-family: var(--font-body); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; color: var(--fg-secondary); margin: 0; max-width: 52ch; }
.section__head--center .section__sub { margin-inline: auto; }
.eyebrow { display: inline-block; }
.section-num { white-space: nowrap; }

/* ============================================================ INTERIOR PAGE HERO */
.phero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(36px, 5vw, 64px); background: var(--cream); margin-top: -85px; }
.phero__in { padding-top: 85px; }
.phero .eyebrow { margin-bottom: 16px; }
.phero h1 { font-size: clamp(38px, 6vw, 84px); line-height: 1.02; margin: 0 0 18px; max-width: 18ch; }
.phero__sub { font-family: var(--font-body); font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; color: var(--fg-secondary); max-width: 44ch; margin: 0; }
.phero--milk { background: var(--milk); }

/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-family: var(--font-ui); font-size: 13px;
  text-transform: lowercase; color: var(--warm-gray); margin-bottom: 22px; }
.crumbs a:hover { color: var(--olive); }
.crumbs .sep { opacity: .5; }
.crumbs .cur { color: var(--graphite); }

/* AEO direct-answer block */
.aeo { background: var(--white); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 26px 30px;
  font-family: var(--font-body); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.6; color: var(--graphite); }
.aeo b { font-family: var(--font-ui); font-weight: 600; }

/* ============================================================ FOOTER */
.footer { background: var(--graphite); color: var(--fg-on-dark); padding-block: 66px 38px; border-top: 1px solid var(--border-on-dark); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; align-items: start; }
.footer__brand { font-family: var(--font-display); font-weight: 400; font-size: 24px; text-transform: lowercase; color: var(--cream); }
.footer__brand .reg { font-size: .42em; vertical-align: top; }
.footer__tag { font-family: var(--font-body); font-size: 14px; line-height: 1.6; color: var(--fg-on-dark-2); margin: 14px 0 0; max-width: 30ch; }
.footer__col { display: flex; flex-direction: column; gap: 11px; }
.footer__col .ttl { color: var(--cream); font-family: var(--font-ui); font-size: 13.5px; text-transform: lowercase; margin-bottom: 5px; }
.footer__col a, .footer__col .lk { color: var(--fg-on-dark-2); font-size: 14px; text-transform: lowercase; transition: color 200ms; cursor: pointer; }
.footer__col a:hover, .footer__col .lk:hover { color: var(--cream); }
.footer__bottom { margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--border-on-dark);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--fg-on-dark-2); }
.footer__legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__legal a:hover { color: var(--cream); }

/* ============================================================ COOKIE + TOAST */
.cookie { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(140%); z-index: 90;
  width: min(820px, calc(100vw - 32px)); background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--r-lg);
  box-shadow: var(--shadow-float); padding: 18px 22px; display: flex; align-items: center; gap: 24px;
  transition: transform 480ms var(--ease-out); }
.cookie.is-in { transform: translateX(-50%) translateY(0); }
.cookie p { margin: 0; font-family: var(--font-body); font-size: 13.5px; line-height: 1.5; color: var(--fg-secondary); }
.cookie p a { color: var(--olive); }
.cookie p a:hover { color: var(--graphite); }
.cookie .btn { flex: none; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--graphite);
  color: var(--cream); padding: 12px 22px; border-radius: var(--r-pill); font-family: var(--font-ui); font-size: 13.5px;
  text-transform: lowercase; opacity: 0; pointer-events: none; transition: all 320ms var(--ease-out); z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================ DRAWER */
html.drawer-open { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 80; background: rgba(42,42,42,.34); opacity: 0; pointer-events: none; transition: opacity 260ms; }
.drawer.is-open { opacity: 1; pointer-events: auto; }
.drawer__panel { position: absolute; top: 0; right: 0; height: 100%; width: min(82vw, 320px); background: var(--milk);
  transform: translateX(100%); transition: transform 320ms var(--ease-out); padding: 26px; display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.drawer__panel a { font-family: var(--font-display); font-weight: 400; font-size: 24px; text-transform: lowercase; color: var(--graphite); padding-block: 10px; }
.drawer__panel a::first-letter { text-transform: uppercase; }
.drawer__panel a.logo::first-letter { text-transform: lowercase; }
.drawer__panel .btn { margin-top: 18px; justify-content: center; }
.drawer__x { background: none; border: none; cursor: pointer; color: var(--graphite); padding: 6px; }

/* ============================================================ RESPONSIVE CHROME */
@media (max-width: 900px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .section__head { margin-bottom: 36px; }
}
@media (max-width: 768px) {
  .phero h1 { font-size: clamp(34px, 7vw, 56px); max-width: 20ch; }
  .phero__sub { font-size: clamp(16px, 2.4vw, 19px); }
  .aeo { padding: 22px 22px; }
}
@media (max-width: 640px) {
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .footer__bottom { flex-direction: column; }
  .cookie { left: 0; right: 0; bottom: 0; width: auto; transform: translateY(120%);
    flex-direction: column; align-items: stretch; gap: 14px; text-align: center;
    border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .cookie.is-in { transform: translateY(0); }
  .cookie .btn { width: 100%; justify-content: center; }
}
@media (max-width: 400px) {
  .phero h1 { font-size: 33px; }
  .crumbs { font-size: 12px; margin-bottom: 16px; }
  .promo-bar p { font-size: 12.5px; }
  .promo-bar__in { padding: 6px 40px; }
}
