/* Home only: reuse catalog tokens without changing catalog/auth/product cards. */
body:has(.coffee-home) { background: var(--color-page-bg, #f4f5f7); }
.coffee-home { font-family: var(--catalog-font, Manrope, Arial, sans-serif); color: var(--color-text-primary, #333); padding: 28px 0 56px; }
.coffee-home > .container { box-sizing: border-box; }
.coffee-home h1, .coffee-home h2, .coffee-home h3, .coffee-home p { margin: 0; }
.coffee-home h2 { font-family: inherit; font-size: 30px; line-height: 1.25; font-weight: 700; letter-spacing: -.035em; }
.home-hero { position: relative; background: #0a0a0a; border-radius: 16px; overflow: hidden; }
/* сцена «тёмной планеты» — фон всего блока, текст поверх */
.home-hero__stage { position: relative; min-height: 420px; }
.home-hero__canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; }
/* лёгкое затемнение слева — заголовок читается на бликах короны */
.home-hero__stage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(100deg, rgba(8,8,8,.62) 0%, rgba(8,8,8,.26) 46%, transparent 72%); }
.home-hero__copy { position: relative; z-index: 2; max-width: 620px; padding: 44px 48px 56px; }
.coffee-home .home-eyebrow { color: rgba(244,244,242,.55); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 20px; }
.coffee-home h1 { font-family: inherit; font-size: clamp(34px, 3.2vw, 46px); font-weight: 700; line-height: 1.13; letter-spacing: -.045em; }
.home-hero__copy h1 { color: #f5f0e9; }
.coffee-home .home-hero__description { max-width: 430px; font-size: 16.5px; line-height: 1.65; color: rgba(244,244,242,.68); margin-top: 20px; }
/* каскадное появление текста поверх сцены */
@keyframes homeHeroRise {
    from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}
.home-hero__copy > * { animation: homeHeroRise .9s cubic-bezier(.16,1,.3,1) both; }
.home-hero__copy > *:nth-child(1) { animation-delay: .15s; }
.home-hero__copy > *:nth-child(2) { animation-delay: .35s; }
.home-hero__copy > *:nth-child(3) { animation-delay: .55s; }
.home-hero__copy > *:nth-child(4) { animation-delay: .75s; }
.home-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 48px; padding: 14px 20px; margin-top: 28px; background: #f5f0e9; color: #0a0a0a; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; }
.home-button:hover { opacity: .88; color: #0a0a0a; }
.home-helper { grid-column: 1 / -1; padding: 28px 40px 30px; background: #fafafa; border-top: 1px solid #eee; display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 12px 24px; }
.home-helper h2 { font-size: 26px; }
.home-helper__form { display: flex; border: 1px solid #d6d6d6; border-radius: 12px; background: #fff; padding: 6px; min-width: 0; }
.home-helper__form:focus-within { border-color: #000; box-shadow: 0 0 0 1px #000; }
.home-helper input, .home-mia input { width: 100%; min-width: 0; border: 0; padding: 8px 14px; background: transparent; color: #333; font: inherit; font-size: 16px; outline: none; box-sizing: border-box; }
.home-helper button, .home-mia__form button { flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 8px; background: #000; color: #fff; font-size: 24px; cursor: pointer; }
.home-helper #home-helper-note { grid-column: 2; font-size: 13px; line-height: 1.55; color: #777; }
.home-helper b { color: #333; font-weight: 700; }
.home-directions { margin-top: 56px; }
.home-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.home-text-link { font-size: 14px; font-weight: 600; color: #333; text-decoration: none; white-space: nowrap; }
.home-text-link:hover { text-decoration: underline; }
.home-directions__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.home-direction { background: #fff; border-radius: 16px; overflow: hidden; color: #333; text-decoration: none; box-shadow: var(--shadow-card-default); transition: box-shadow .2s ease; }
.home-direction:hover { box-shadow: var(--shadow-card-hover); color: #000; }
.home-direction img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; filter: none; }
.home-direction > div { padding: 18px 16px 36px; position: relative; }
.home-direction h3 { font: inherit; font-size: 16px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.coffee-home .home-direction p { font-size: 12px; line-height: 1.5; color: #777; margin-top: 8px; }
.home-direction span { position: absolute; bottom: 12px; right: 16px; font-size: 19px; }
.coffee-home .new { margin: 56px 0 0; padding: 0; }
.coffee-home .new .container, .coffee-home .blog-coffee .container { max-width: none; width: 100%; padding: 0; }
.coffee-home .new__inner { margin: 0; padding: 0; }
.coffee-home .new__title { font-family: inherit; font-size: 30px; font-weight: 700; letter-spacing: -.035em; line-height: 1.25; margin: 0 0 24px; }
.coffee-home .new__cards { margin: 0; }
.home-purchase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 40px; gap: 16px; }
.home-purchase a { display: flex; flex-direction: column; gap: 7px; background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 22px 24px; color: #333; text-decoration: none; }
.home-purchase strong { font-size: 15px; font-weight: 600; }
.home-purchase span { font-size: 13px; color: #777; line-height: 1.5; }
.home-purchase a:hover { border-color: #777; }
.coffee-home .blog-coffee { margin: 56px 0 0; padding: 0; }
.coffee-home .blog-coffee__inner { margin: 0; padding: 0; }
.coffee-home .blog-coffee__container { margin: 0 0 24px; padding: 0; display: flex; justify-content: space-between; }
.coffee-home .blog-coffee__info { width: 100%; }
.coffee-home .blog-coffee__title { font: inherit; font-size: 30px; font-weight: 700; letter-spacing: -.035em; line-height: 1.25; margin: 0 0 12px; }
.coffee-home .blog-coffee__text { font: inherit; font-size: 15px; line-height: 1.6; color: #777; max-width: 580px; margin: 0 0 12px; }
.coffee-home .blog-coffee__link { display: inline-block; font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; }
.coffee-home .blog-coffee__container > .blog-coffee__image { display: none; }
.coffee-home .blog-coffee__items { gap: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.coffee-home .blog-coffee__item { width: auto; margin: 0; padding: 16px; border-radius: 16px; background: #fff; color: #333; min-width: 0; }
.coffee-home .blog-coffee__items .blog-coffee__image { display: block; height: auto; margin: 0 0 16px; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 12px; }
.coffee-home .blog-coffee__image img { width: 100%; height: 100%; object-fit: cover; }
.coffee-home .blog-coffee__name { font: inherit; font-size: 18px; font-weight: 600; line-height: 1.35; margin: 0 0 10px; }
.coffee-home .blog-coffee__content { font: inherit; font-size: 14px; line-height: 1.6; margin: 0; color: #777; }
.coffee-home .blog-coffee__date { font: inherit; font-size: 12px; color: #777; margin-top: 14px; }
body:has(.coffee-home) .social-invite { margin: 0; padding: 28px 0; font-family: var(--catalog-font); border-top: 1px solid #e0e0e0; }
body:has(.coffee-home) .footer { font-family: var(--catalog-font); }
.home-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.coffee-home a:focus-visible, .coffee-home button:focus-visible, .home-mia button:focus-visible { outline: 2px solid #333; outline-offset: 4px; }
.home-mia, .home-mia-backdrop { font-family: var(--catalog-font, Manrope, Arial, sans-serif); box-sizing: border-box; }
.home-mia[hidden], .home-mia-backdrop[hidden], .home-mia__retry[hidden] { display: none; }
/* Theme the native opener; its channel menu and handlers remain Bitrix-owned. */
body:has(.coffee-home) .b24-widget-button-position-bottom-right { right: 24px; bottom: 24px; }
body:has(.coffee-home) [data-b24-crm-button-block-button] { position: relative; width: 92px; height: 52px; border-radius: 26px; transform: none; }
body:has(.coffee-home) [data-b24-crm-button-block-button] .b24-widget-button-block { width: 100%; height: 52px; border-radius: 26px; }
body:has(.coffee-home) [data-b24-crm-button-block-inner] { height: 52px; background: #000 !important; border-radius: 26px; box-shadow: 0 4px 20px #0002; }
body:has(.coffee-home) [data-b24-crm-button-block-button]::after { content: "Mia  ✦"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; color: #fff; font: 600 16px var(--catalog-font, Manrope, Arial, sans-serif); }
body:has(.coffee-home) [data-b24-crm-button-block-inner] > *,
body:has(.coffee-home) [data-b24-crm-button-block-border],
body:has(.coffee-home) [data-b24-crm-button-pulse] { visibility: hidden; }
body:has(.coffee-home) [data-b24-crm-button-block-button]:focus-visible { outline: 2px solid #333; outline-offset: 4px; }
body.home-mia-open:has(.coffee-home) .b24-widget-button-wrapper { display: none !important; }
.home-mia-backdrop { position: fixed; inset: 0; background: #0004; z-index: 2002; }
.home-mia { position: fixed; right: 24px; bottom: 24px; width: 420px; max-width: calc(100vw - 32px); height: 580px; max-height: calc(100dvh - 48px); background: #fff; border-radius: 16px; box-shadow: 0 12px 64px #0003; z-index: 2003; display: flex; flex-direction: column; overflow: hidden; color: #333; }
.home-mia__head { padding: 20px 24px; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; }
.home-mia__head h2 { font: inherit; font-weight: 700; font-size: 22px; margin: 0; }
.home-mia__head p { color: #777; font-size: 12px; margin: 4px 0 0; }
.home-mia__close { width: 40px; height: 40px; border: 0; background: #f4f5f7; border-radius: 8px; font-size: 28px; cursor: pointer; }
.home-mia__messages { overflow: auto; min-height: 0; flex: 1; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.home-mia__message { padding: 12px 14px; border-radius: 12px; background: #f4f5f7; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 92%; align-self: flex-start; }
.home-mia__message--visitor { align-self: flex-end; background: #000; color: #fff; }
.home-mia__message a { color: inherit; text-decoration: underline; }
.home-mia__status { padding: 0 24px; font-size: 13px; line-height: 1.5; color: #777; margin: 0; }
.home-mia__retry { margin: 8px 24px 0; padding: 10px 14px; background: #f4f5f7; border: 1px solid #ddd; border-radius: 8px; cursor: pointer; align-self: flex-start; }
.home-mia__form { display: flex; margin: 16px 16px 0; padding: 6px; border: 1px solid #d6d6d6; border-radius: 12px; }
.home-mia__note { font-size: 11px; line-height: 1.5; color: #777; margin: 10px 22px 16px; }
.home-mia-open { overflow: hidden; }
@media (max-width: 991px) {
    .home-hero__copy { padding: 28px; }
    .coffee-home h1 { font-size: 36px; }
    .home-helper { padding: 24px 28px; grid-template-columns: 140px 1fr; gap: 12px 20px; }
    .home-helper h2 { font-size: 22px; }
    .home-directions__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .home-direction { grid-column: span 2; }
    .home-direction:nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 767px) {
    .coffee-home { padding: 16px 0 32px; }
    .home-hero__stage { min-height: 400px; display: flex; }
    .home-hero__copy { padding: 28px 24px 44px; }
    .coffee-home h1 { font-size: 30px; }
    .coffee-home .home-eyebrow { margin-bottom: 14px; }
    .coffee-home .home-hero__description { margin-top: 16px; font-size: 15px; }
    .home-button { margin-top: 22px; }
    .home-helper { grid-template-columns: 1fr; padding: 20px; gap: 12px; }
    .home-helper h2 { font-size: 24px; }
    .home-helper #home-helper-note { grid-column: 1; font-size: 12px; }
    .home-helper input { padding: 8px; }
    .home-directions, .coffee-home .new, .coffee-home .blog-coffee { margin-top: 36px; }
    .coffee-home h2, .coffee-home .new__title, .coffee-home .blog-coffee__title { font-size: 24px; }
    .home-section-head { margin-bottom: 18px; }
    .home-directions__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .home-direction, .home-direction:nth-child(n+4) { grid-column: auto; }
    .home-direction--tea { grid-column: 1 / -1 !important; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
    .home-direction--tea img { height: 100%; }
    .home-direction > div { padding: 14px 12px 34px; }
    .home-direction h3 { font-size: 15px; }
    .home-purchase { grid-template-columns: 1fr; gap: 10px; margin-top: 28px; }
    .home-purchase a { padding: 18px 20px; }
    .coffee-home .blog-coffee__items { grid-template-columns: 1fr; gap: 16px; }
    .coffee-home .blog-coffee__items .blog-coffee__item { display: flex; }
    body:has(.coffee-home) .b24-widget-button-position-bottom-right { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
    .home-mia { inset: 12px 12px auto; width: auto; max-width: none; height: calc(100dvh - 24px); max-height: none; padding-bottom: env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion: reduce) { .coffee-home *, .home-mia *, body:has(.coffee-home) .b24-widget-button-wrapper { transition: none !important; scroll-behavior: auto !important; } .home-hero__copy > *, body:has(.coffee-home) .b24-widget-button-wrapper { animation: none !important; } }
