/* ═══════════════════════════════════════════════════════════════════════════════════════════════════
   BRANDS ARCHIVE — /brand/, from ~/Downloads/brands-archive-mockup.html, 22 Sep 2026.
   Scoped to `.pt-ba`. `.alphabet-filter` keeps its own class per the brief but is styled inside the
   wrapper, so the old `css/brand-page-styles.css` rules cannot reach these (they are (0,1,0), these are
   (0,2,0)) and the two sheets cannot fight.
   The mockup's `@container` queries become `@media` at 1100 and 640.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════ */

/* Full width, the same way the shop grid does it: `.site-content` is display:flex, so a flex basis is
   the part that actually settles the width. [[the shop-grid fix, 22 Sep]] */
.pt-ba{flex:0 0 100vw;width:100vw;max-width:100vw;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);overflow-x:clip}
.pt-ba{background:var(--pt-surface-dim);color:var(--pt-ink);font-size:15px;line-height:1.5}
.pt-ba *{box-sizing:border-box}
.pt-ba a{color:inherit;text-decoration:none}
.pt-ba h1,.pt-ba h3{text-transform:none}          /* the theme title-cases headings */
.pt-ba .wrap{max-width:1320px;margin:0 auto;padding:0 32px}

/* head */
.pt-ba .ba-head{padding:28px 0;display:grid;grid-template-columns:1fr 440px;gap:40px;align-items:end}
.pt-ba .crumb{font-size:13px;color:var(--pt-ink-3);margin:0 0 14px}
.pt-ba .crumb a{color:var(--pt-accent)}
.pt-ba .crumb span{margin:0 6px;color:var(--pt-border-strong)}
.pt-ba h1{font-size:40px;font-weight:800;letter-spacing:-.03em;line-height:1.05;margin:0 0 8px;color:var(--pt-ink)}
.pt-ba .ba-head p{margin:0;color:var(--pt-ink-2);font-size:16px}
.pt-ba .ba-search{display:flex;align-items:center;gap:10px;height:48px;padding:0 14px;background:var(--pt-surface);border:1px solid var(--pt-border-strong)}
.pt-ba .ba-search:focus-within{outline:2px solid var(--pt-accent);outline-offset:-1px}
.pt-ba .ba-search svg{width:18px;height:18px;flex:none;fill:none;stroke:var(--pt-ink-3);stroke-width:1.7}
.pt-ba .ba-search input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:15px;height:auto;min-height:0;padding:0;margin:0;color:var(--pt-ink)}
.pt-ba .ba-search .clear{display:none;font:inherit;font-size:13px;color:var(--pt-accent);background:none;border:0;cursor:pointer;padding:0}
.pt-ba .ba-search.has .clear{display:block}

/* ── the alphabet. Sticky under the header, so the index is reachable from anywhere on a long page. ── */
.pt-ba .alphabet-filter{position:sticky;top:var(--pt-header-h,0px);z-index:5;background:var(--pt-surface-dim);border-top:1px solid var(--pt-ink);border-bottom:1px solid var(--pt-border)}
.pt-ba .alphabet-filter .in{display:flex;justify-content:space-between;gap:2px;padding:8px 0}
.pt-ba .alphabet-filter a,.pt-ba .alphabet-filter span{flex:1;min-width:30px;height:36px;display:flex;align-items:center;justify-content:center;font-family:var(--pt-mono);font-size:14px;font-weight:600;color:var(--pt-ink)}
.pt-ba .alphabet-filter a:hover{background:var(--pt-bone)}
.pt-ba .alphabet-filter a.on{background:var(--pt-ink);color:var(--pt-on-primary)}
/* A letter with no brands is SHOWN and disabled, not removed: a gap in an A–Z is information. */
.pt-ba .alphabet-filter .off{color:var(--pt-border-strong);font-weight:400;pointer-events:none}
.pt-ba .alphabet-filter a:focus-visible{outline:2px solid var(--pt-accent);outline-offset:-2px}

/* ── most popular ── */
.pt-ba .ba-popular{padding:40px 0 8px}
.pt-ba .sec-h{display:flex;justify-content:space-between;align-items:baseline;margin:0 0 16px}
.pt-ba .sec-h b{font-size:15px}
.pt-ba .sec-h span{font-size:12.5px;color:var(--pt-ink-3)}
.pt-ba .pop-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}

/* ── tiles ── */
.pt-ba .pop,.pt-ba .tile{background:var(--pt-surface);border:1px solid var(--pt-border);display:flex;flex-direction:column}
.pt-ba .pop:hover,.pt-ba .tile:hover{border-color:var(--pt-ink)}
.pt-ba .pop:focus-visible,.pt-ba .tile:focus-visible{outline:2px solid var(--pt-accent);outline-offset:2px}
.pt-ba .logo-area{background:var(--pt-fill-control);display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}
.pt-ba .pop .logo-area{aspect-ratio:16/9}
.pt-ba .tile .logo-area{aspect-ratio:4/3}
/* CONTAIN and capped: a logo is a mark, and a cropped or stretched mark is the wrong mark. */
.pt-ba .logo-area img{max-width:62%;max-height:48%;width:auto;height:auto;object-fit:contain}
.pt-ba .mono-mark{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--pt-bone);color:var(--pt-ink);font-weight:900;font-size:34px;letter-spacing:-.04em}
.pt-ba .pop .mono-mark{font-size:48px}
.pt-ba .meta{padding:12px 14px 14px;border-top:1px solid var(--pt-border);display:block}
.pt-ba .pop .meta{padding:14px 16px;display:flex;justify-content:space-between;align-items:baseline}
.pt-ba .meta b{display:block;font-size:14.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pt-ba .pop .meta b{font-size:16px}
.pt-ba .meta .pt-mono{font-size:12px;color:var(--pt-ink-3)}
.pt-ba .pop .meta .pt-mono{font-size:12.5px}

/* ── letter groups: a book index ── */
.pt-ba .ba-groups{padding:24px 0 96px}
.pt-ba .ba-group{display:grid;grid-template-columns:120px minmax(0,1fr);gap:24px;padding:28px 0;border-top:1px solid var(--pt-border);scroll-margin-top:calc(var(--pt-header-h,0px) + 64px)}
.pt-ba .ba-group:first-child{border-top:0}
.pt-ba .ba-group[hidden]{display:none}
/* The letter stays with you while you read its brands — that is what makes it an index and not a list. */
.pt-ba .letter{font-size:56px;font-weight:800;letter-spacing:-.04em;line-height:1;position:sticky;top:calc(var(--pt-header-h,0px) + 60px);align-self:start}
.pt-ba .letter small{display:block;font-size:12px;font-weight:400;letter-spacing:0;color:var(--pt-ink-3);margin-top:8px}
.pt-ba .tiles{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.pt-ba .tile[hidden]{display:none}

/* ── no results ── */
.pt-ba .ba-none{padding:56px 24px;text-align:center;background:var(--pt-surface);border:1px solid var(--pt-border);margin:32px 0 96px}
.pt-ba .ba-none[hidden]{display:none}
.pt-ba .ba-none h3{margin:0 0 6px;font-size:20px;color:var(--pt-ink)}
.pt-ba .ba-none p{margin:0 0 18px;color:var(--pt-ink-2)}
.pt-ba .ba-btn{display:inline-flex;align-items:center;justify-content:center;height:44px;padding:0 24px;border:1px solid var(--pt-ink);background:var(--pt-surface);color:var(--pt-ink);font-size:15px;font-weight:600;cursor:pointer}
.pt-ba .ba-btn:hover{background:var(--pt-fill-control)}

/* ═══════════════ TABLET ═══════════════ */
@media (max-width:1100px){
  .pt-ba .ba-head{grid-template-columns:1fr;gap:20px}
  .pt-ba .pop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pt-ba .tiles{grid-template-columns:repeat(4,minmax(0,1fr))}
  .pt-ba .ba-group{grid-template-columns:80px minmax(0,1fr)}
  .pt-ba .letter{font-size:44px}
}

/* ═══════════════ PHONE ═══════════════ */
@media (max-width:640px){
  .pt-ba .wrap{padding:0 16px}
  .pt-ba .ba-head{padding:18px 0 20px}
  .pt-ba h1{font-size:30px}
  .pt-ba .ba-head p{font-size:15px}
  /* The A–Z becomes a swipe strip, still pinned: 27 equal letters on a phone are 13px each. */
  .pt-ba .alphabet-filter .in{justify-content:flex-start;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:6px 16px}
  .pt-ba .alphabet-filter .in::-webkit-scrollbar{display:none}
  .pt-ba .alphabet-filter a,.pt-ba .alphabet-filter span{flex:none;width:34px;min-width:34px;height:34px}
  .pt-ba .ba-popular{padding-top:24px}
  .pt-ba .pop-grid{grid-auto-flow:column;grid-template-columns:none;grid-auto-columns:64%;gap:12px;overflow-x:auto;/* FREE SCROLL, no snap (Leon, 22 Sep). `scroll-snap-type` yanks the rail to the nearest card the
   moment you let go, which fights a flick and makes a half-scroll impossible. A rail is a shelf, not a
   slideshow: it should stop where it is put. */
    scrollbar-width:none}
  .pt-ba .pop-grid::-webkit-scrollbar{display:none}
  .pt-ba .letter{position:static;font-size:34px;display:flex;align-items:baseline;gap:10px}
  .pt-ba .letter small{display:inline;margin:0}
  .pt-ba .tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .pt-ba .mono-mark{font-size:28px}
  .pt-ba .pop .mono-mark{font-size:34px}
}
