/* Фрагмент Branch/styles.css (раздел по порядку каскада) */
/* ══ БРЕНДЫ, КОТОРЫМ МЫ ДОВЕРЯЕМ · карусель active-center + peek ══
   Механика переключения — та же, что в «Это вас заинтересует»: свой снап
   твином на rAF по кривой cubic-bezier(.42,0,.58,1), нативного scroll-snap нет.
   На активной карточке фоном играет видео, у соседних — светлый фон и флакон. */
.brands{ --brand-w:clamp(320px,43vw,838px); padding:clamp(50px,7vw,120px) 0; }
.brands-h{ margin:0 65px; font-size:clamp(38px,5.13vw,100px); line-height:.94; letter-spacing:-.02em; font-weight:400; text-transform:uppercase; text-align:center; color:#a3a932; }
.brands-tabs{ display:flex; justify-content:center; flex-wrap:wrap; gap:14px; margin-top:49px; }
.brands-tab{ height:56px; padding:0 29px; border:0; border-radius:var(--r-btn,17px); background:none; color:#6B6850; font-family:inherit; font-size:16px; cursor:pointer; transition:background .2s,color .2s; }
.brands-tab:hover{ color:#5E6024; }
.brands-tab.is-active{ background:rgba(130,134,52,.1); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); color:#5E6024; }

.brands-viewport{ margin-top:52px; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; -ms-overflow-style:none; cursor:grab; overscroll-behavior-x:contain; }
.brands-viewport::-webkit-scrollbar{ display:none; }
.brands-viewport.is-dragging{ cursor:grabbing; }
.brands-track{ display:flex; gap:14px; width:max-content; padding-inline:calc((100% - var(--brand-w)) / 2); }

.brand-card{ flex:0 0 auto; width:var(--brand-w); aspect-ratio:838 / 795; border-radius:24px; overflow:hidden; position:relative; background:#f3eee2; cursor:pointer; user-select:none; }
.brand-card.is-active{ cursor:default; }
/* неактивная карточка кликабельна целиком — доезжает в центр */
.brand-card:not(.is-active) a,
.brand-card:not(.is-active) button{ pointer-events:none; }

/* фон активной карточки — видео (постер = первый кадр, подмены не видно) */
.brand-card__video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity .45s ease; z-index:0; pointer-events:none; background:#2A2A1E; }
.brand-card.is-active .brand-card__video{ opacity:1; }
/* затемнение под белым текстом поверх видео */
.brand-card__scrim{ position:absolute; inset:0; z-index:1; opacity:0; transition:opacity .45s ease; pointer-events:none;
  background:linear-gradient(180deg, rgba(0,0,0,.32) 0%, rgba(0,0,0,0) 34%, rgba(0,0,0,.42) 100%); }
.brand-card.is-active .brand-card__scrim{ opacity:1; }

.brand-card__shot{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:52%; max-height:72%; object-fit:contain; z-index:1; border-radius:16px; }
.brand-card.is-active .brand-card__shot{ display:none; }
.brand-card__name{ position:absolute; top:34px; left:34px; z-index:2; font-size:clamp(24px,3.2vw,60px); line-height:1; color:#a3a932; }
.brand-card.is-active .brand-card__name{ color:#fff; }
.brand-card__tag{ position:absolute; top:38px; right:34px; z-index:2; font-size:clamp(12px,1vw,18px); color:#fff; opacity:.85; display:none; }
.brand-card.is-active .brand-card__tag{ display:block; }
.brand-card__desc{ position:absolute; left:50%; bottom:16px; transform:translateX(-50%); width:94%; max-width:788px; z-index:2; background:#fff; -webkit-backdrop-filter:blur(23.55px); backdrop-filter:blur(23.55px); border-radius:24px; padding:18px 24px; display:none; }
.brand-card.is-active .brand-card__desc{ display:block; }
.brand-card__desc p{ margin:0; font-size:18px; line-height:1.15; color:#828634; }

/* S13: на узком экране — родная прокрутка со scroll-snap, без доводки скриптом (branch.js); жест внутри ленты
   не перехватывается. touch-action: pan-x pan-y, а не pan-x — иначе вертикальный жест по ленте не прокручивал бы страницу. */
@media (max-width:900px){
  .brands-viewport{scroll-snap-type:x mandatory;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;cursor:auto}
  .brand-card{scroll-snap-align:center;scroll-snap-stop:always}
}
