/* ==========================================================================
   IPS — brands index (/brands) + brand page (brand.html)
   Builds on main.css / extra.css / system.css (.phead, .fbar, .btiles, .cards ...).
   ========================================================================== */

/* hidden must win over component display rules (.link-u, .btn ...) */
[data-page-root] [hidden] { display: none !important; }

/* ---------- shared: compact section rhythm ---------- */
.bsec { padding-top: var(--sec-tight); }
.bsec--last { padding-bottom: var(--sec); }
.bsec .sec-head { margin-bottom: clamp(18px, 2vw, 32px); }

/* ---------- shared: brand tile grids ---------- */
/* logo box with a definite size: the logo fills it with object-fit, so SVG logos without width/height
   can't overflow the tile; with known proportions (.has-ar, set by the page scripts) logos get equal visual area */
.btiles .btile__logo { position: absolute; inset: 24% 9%; width: auto; height: auto; }
.btiles .btile__logo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
.btiles .btile__logo.has-ar { inset: auto; left: 50%; top: 47%; width: var(--mw); max-height: 60%; aspect-ratio: var(--ar); transform: translate(-50%, -50%); }
.btiles .btile__logo:has(> img):not(.has-ar) { inset: 30% 22%; } /* logo of unknown proportions: about the same size as the balanced ones */
.btile:focus-visible .btile__name { opacity: 1; transform: none; }
.btiles .btile__name > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btiles .btile__name > span + span { flex: none; color: var(--slate); }
/* one row of six (brand page: other brands, not-found suggestions) */
.btiles.bx-six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1024px) { .btiles.bx-six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .btiles.bx-six { gap: 8px; } }
@media (max-width: 370px) { .btiles.bx-six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* phones: breadcrumb links get a finger-sized hit area without moving anything */
@media (max-width: 760px) { [data-page^="brand"] .crumbs a { display: inline-block; padding: 12px 0; margin: -12px 0; } }

/* ---------- shared: small enquiry row ---------- */
.bcta {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center;
  padding: clamp(22px, 2.6vw, 36px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.bcta__title { grid-column: 1 / span 5; }
.bcta__text { grid-column: 6 / span 4; max-width: 460px; }
.bcta__btn { grid-column: 10 / span 3; justify-self: end; }
@media (max-width: 1024px) {
  .bcta__title { grid-column: 1 / -1; }
  .bcta__text { grid-column: 1 / span 9; margin-top: 12px; }
  .bcta__btn { grid-column: 1 / -1; justify-self: start; margin-top: 20px; }
}
@media (max-width: 760px) { .bcta__text { grid-column: 1 / -1; } }

/* ==========================================================================
   /brands
   ========================================================================== */
.bx { padding-bottom: var(--sec-tight); }
.phead__aside a { color: var(--ink); }
/* full-bleed sticky bar; it slides down with the header when the header comes back */
.bx .fbar {
  margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad);
  transition: top .7s var(--ease);
}
@media (min-width: 761px) {
  .header:not(.is-hidden) ~ main .bx .fbar { top: var(--header-h); }
}
.bx .fsearch input { width: clamp(220px, 21vw, 300px); }
/* clear button: a quiet ink cross instead of the browser's blue one; while the field is empty it takes no room */
.bx .fsearch input::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin: 0 -6px 0 6px; cursor: pointer; opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 4.5l7 7M11.5 4.5l-7 7' stroke='%23202d47' stroke-width='1.4' fill='none'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.bx .fsearch input::-webkit-search-cancel-button:hover { opacity: 1; }
.bx .fsearch input::-webkit-search-decoration { -webkit-appearance: none; }
.bx .fsearch input:placeholder-shown::-webkit-search-cancel-button { display: none; }
.bx .fcount { min-width: 5.5em; text-align: right; }
/* the country box is only a wrapper in the bar (on phones it moves into the bottom sheet);
   the in-field result count is for phones */
.bx-country { display: contents; }
.bx-qcount { display: none; }
/* faceted counts: a choice that would leave nothing is dimmed (still clickable) */
.bx .filter.is-zero { opacity: .45; }
.bx .filter sup { min-width: 1.4em; font-variant-numeric: tabular-nums; }
.bx-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
/* tiles re-render on every filter change: a quicker rise than the page-level reveal */
.js .bx-grid .btile[data-reveal="fade"] {
  transform: translate3d(0, 16px, 0);
  transition: opacity .7s var(--ease), transform .8s var(--ease), box-shadow .6s var(--ease);
  transition-delay: var(--d, 0s), var(--d, 0s), 0s;
}
.js .bx-grid .btile[data-reveal="fade"].is-in { transform: none; }
.bx-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 18px; }
@media (max-width: 1280px) { .bx-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .bx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bx-cta-wrap { padding-bottom: var(--sec); }

/* ---------- phones ----------
   [group chips ............]   one row; scrolls away with the page
   [🔍 search ·········· 62] [Filters ①]   stays stuck: right under the header, or at the very top while it is hidden
   The country select sits in the shared bottom sheet (IPS_LIB.filterSheet). */
@media (max-width: 760px) {
  .bx .fbar {
    --bx-row: 44px; /* chips row height */
    --bx-hide: 52px; /* chips row + row gap: what slides out above the top edge while stuck */
    position: sticky; top: calc(var(--bx-hide) * -1);
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 8px; padding-bottom: 8px; margin-bottom: 18px;
  }
  .header:not(.is-hidden) ~ main .bx .fbar { top: calc(var(--header-h) - var(--bx-hide)); }
  /* the stuck chips row waits behind the header: the header fill must be fully opaque, or it shows through */
  [data-page="brands"] .header.is-solid::before { background: var(--paper); }
  .bx-chips {
    flex-wrap: nowrap; height: var(--bx-row); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none;
    margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); scroll-padding: 0 var(--pad);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--pad)), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - var(--pad)), transparent);
  }
  .bx-chips::-webkit-scrollbar { display: none; }
  /* the chips share the row evenly (a segmented row); if they ever don't fit, the row scrolls */
  .bx-chips .filter { flex: 1 0 auto; justify-content: center; gap: 6px; height: var(--bx-row); min-height: 0; padding: 0 12px; font-size: 14px; }
  .bx-chips .filter sup { font-size: 10.5px; }
  .bx-tools { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; width: 100%; }
  .bx .bx-search { flex: 1 1 0; width: auto; min-width: 0; }
  .bx .bx-search input {
    width: 100%; height: 44px; padding-right: 12px; font-size: 16px; /* 16px: no iOS zoom on focus */
    background: var(--white); -webkit-appearance: none; appearance: none; border-radius: 2px;
  }
  .bx .bx-search input::placeholder { color: var(--text-3); }
  /* while a query is typed, the live result count rides in the search field
     (the keyboard may hide the grid; the bar's own count stays for screen readers) */
  .bx-qcount {
    display: flex; align-items: center; position: absolute; top: 0; right: 0; bottom: 0; padding: 0 12px 0 6px; pointer-events: none;
    font-family: var(--f-latin); font-size: 12px; font-weight: 500; letter-spacing: .04em; color: var(--text-3); font-variant-numeric: tabular-nums;
  }
  .bx .bx-search input:not(:placeholder-shown) { padding-right: 40px; }
  .bx .bx-search input:placeholder-shown ~ .bx-qcount { display: none; }
  .bx .fsheet-btn { flex: none; height: 44px; }
  .bx .fcount { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bx .freset { display: none; }
  /* tiles: three per row (two on the smallest phones), a little taller so logos read */
  .bx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .bx-grid .btile, .btiles.bx-six .btile { aspect-ratio: 4 / 3; }
  .bx-grid .btile__logo.has-ar, .btiles.bx-six .btile__logo.has-ar { width: min(84%, calc(var(--mw) * 1.12)); }
}
/* the bottom sheet (phones), titled "Country": the countries as two columns of chips with their counts
   (one tap picks and closes); the select stays the control of the desktop bar */
.bx-clist { display: none; }
.fsheet .bx-country { display: block; }
.fsheet .bx-country .fselect { display: none; }
.fsheet .bx-clist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fsheet .bx-clist .filter {
  height: auto; min-height: 46px; justify-content: space-between; gap: 8px; padding: 9px 12px; text-align: left;
  font-size: 14.5px; line-height: 1.25; background: var(--white);
}
.fsheet .bx-clist .filter sup { flex: none; font-size: 11px; }
.fsheet .bx-clist .filter.is-active { background: var(--ink); }
.fsheet .bx-clist .filter:disabled { opacity: .4; }

@media (max-width: 370px) {
  .bx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bx-grid .btile { aspect-ratio: 3 / 2; }
  .bx-chips .filter { padding: 0 10px; font-size: 13px; }
  .fsheet .bx-clist .filter { padding: 9px 10px; font-size: 13.5px; }
}

/* ==========================================================================
   brand.html — compact: hero row, about + facts, projects, articles, other brands, enquiry band
   ========================================================================== */

/* ---------- hero: framed logo panel next to the name and key lines, centred, no empty gaps ---------- */
.bhero { padding-top: calc(var(--header-h) + clamp(18px, 2.6vw, 44px)); }
.bhero .crumbs { margin-bottom: clamp(18px, 2.2vw, 30px); }
.bhero__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }

/* white logo panel — brand tiles morph into it (data-morph-target); grows with a long two-line name */
.bhero__logo {
  grid-column: 1 / span 5; align-self: stretch; position: relative; min-height: clamp(236px, 21vw, 312px);
  border-radius: var(--radius); background-color: var(--white); overflow: hidden;
  background-image: none !important; /* the morph fallback paints the card image as a cover background; a logo must not */
}
.bhero__logo::after { /* hairline frame, like a spec sheet */
  content: ""; position: absolute; inset: 12px; border: 1px solid var(--line-2); border-radius: 3px; pointer-events: none;
}
/* the mark box has a definite size, the logo fills it with object-fit (SVGs without width/height can't overflow);
   with known proportions (.has-ar, set by page-brand.js) it is sized for equal visual area */
.bhero__mark { position: absolute; inset: 28% 21%; display: grid; place-items: center; }
.bhero__mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; } /* absolute: % heights of grid items in auto rows don't resolve */
.bhero__mark.has-ar { inset: auto; left: 50%; top: 50%; width: var(--mw); max-height: 50%; aspect-ratio: var(--ar); transform: translate(-50%, -50%); }
.bhero__mark:has(> img):not(.has-ar) { inset: 32% 30%; }
/* logos drawn for dark backgrounds (white artwork) are inverted to read on the white panel, like .btile--inv */
.bhero__logo--inv .bhero__mark img { filter: invert(1) grayscale(1) contrast(1.1); }
/* no logo file yet: a tracked wordmark, deliberately unlike the h1 next to it */
.bhero__word {
  font-family: var(--f-latin); font-weight: 600; font-size: clamp(20px, 2.3vw, 38px); line-height: 1.2; letter-spacing: .1em;
  text-transform: uppercase; color: var(--slate); text-align: center; overflow-wrap: anywhere;
}
.bhero__info { grid-column: 7 / span 6; min-width: 0; padding: 6px 0; }
.bhero__info > .marker { display: flex; margin-bottom: clamp(14px, 1.5vw, 22px); }
.bhero__name { font-family: var(--f-latin); font-weight: 700; letter-spacing: -.02em; line-height: 1.04; overflow-wrap: anywhere; }
html[lang="ka"] .bhero__name { line-height: 1.06; }
.bhero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: clamp(12px, 1.2vw, 18px); color: var(--text-2); font-size: 15px; line-height: 1.4; }
.bhero__meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.bhero__prod { margin-top: 8px; font-size: clamp(17px, 1.35vw, 21px); line-height: 1.45; font-weight: 400; max-width: 34em; }
.bhero__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin-top: clamp(18px, 1.8vw, 26px); padding-top: clamp(14px, 1.4vw, 18px); border-top: 1px solid var(--line);
}
.bhero__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.bhero__tag { transition: border-color .4s var(--ease), background-color .4s var(--ease); }
.bhero__tag:hover { border-color: var(--ink); background-color: var(--white); }
.bhero__site { font-size: 14px; font-weight: 500; white-space: nowrap; }

/* ---------- about: the brand text (cols 1–6) beside its key facts (cols 8–12) ----------
   Both columns end level (page-brand.js measures them): the facts rows share the extra height of a longer
   text (each row centred in its slot; --spec-max caps the table so a very long text can't blow it apart); a text
   a little shorter than the facts gets a larger lead (--k); a much shorter one becomes a statement above a facts strip. */
.babout { --lead: clamp(18px, 1.45vw, 22px); --lead-lh: 1.5; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: stretch; }
.babout--s { --lead: clamp(20px, 1.85vw, 28px); --lead-lh: 1.42; }
.babout--xs { --lead: clamp(22px, 2.3vw, 36px); --lead-lh: 1.34; }
.babout__marker { grid-column: 1 / -1; display: flex; margin-bottom: clamp(16px, 1.8vw, 26px); }
.babout__text { grid-column: 1 / span 6; align-self: start; }
.babout .bspec { grid-column: 8 / span 5; max-height: var(--spec-max, none); }
.babout--notext .bspec { grid-column: 1 / span 8; }
.babout__text > * + * { margin-top: .85em; }
.babout__lead { font-size: min(calc(var(--lead) * var(--k, 1)), 40px); line-height: var(--lead-lh); font-weight: 400; }
html[lang="ka"] .babout__lead { line-height: calc(var(--lead-lh) + .04); }
.babout__p, .babout__list { color: var(--text-2); font-size: clamp(15px, 1.05vw, 17px); line-height: 1.65; }
.babout__list { display: grid; gap: 4px; }
.babout__list li { position: relative; padding-left: 22px; }
.babout__list li::before { content: ""; position: absolute; left: 2px; top: .82em; width: 9px; height: 1px; background: currentColor; opacity: .7; }
.bspec { display: flex; flex-direction: column; margin: 0; border-top: 1px solid var(--line); } /* dl: no UA margins */
.bspec__row {
  flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 16px;
  align-content: center; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.bspec dt { color: var(--text-3); padding-top: 3px; }
.bspec dd { margin: 0; font-size: 15px; font-weight: 400; line-height: 1.5; }
.bspec dd a { font-weight: 500; }
/* measuring pass (page-brand.js): the facts at their natural height */
.babout.is-measure .bspec { align-self: start; max-height: none; }
.babout.is-measure .bspec__row { flex: none; }
/* short text: a statement across the page, the facts as one strip of cells below it */
.babout.is-stack { --lead: clamp(24px, 2.4vw, 38px); --lead-lh: 1.3; }
.babout.is-stack .babout__text { grid-column: 1 / span 9; max-width: 62em; }
.babout.is-stack .babout__p, .babout.is-stack .babout__list { max-width: 54em; }
.babout.is-stack .bspec {
  grid-column: 1 / -1; align-self: start; max-height: none; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  margin-top: clamp(26px, 2.8vw, 40px); padding-left: 0; border-bottom: 1px solid var(--line);
}
.babout.is-stack .bspec__row { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 20px 0; border-bottom: 0; }
.babout.is-stack .bspec__row + .bspec__row { padding-left: 20px; border-left: 1px solid var(--line); }
.babout.is-stack .bspec dt { padding-top: 0; }

/* ---------- projects with the brand ---------- */
/* overlay cards reveal from the light page: the dark legibility gradient lives inside the clipped photo (not on
   the card, where it showed as a navy box before the photo), and the white title fades in once the photo is in */
.bcards-p .pcard--ov::after { content: none; }
.bcards-p .pcard--ov .media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 28, 45, 0) 42%, rgba(20, 28, 45, .82) 100%);
}
@supports selector(:has(*)) {
  .js .bcards-p .pcard--ov .pcard__info { opacity: 0; transition: opacity .9s var(--ease) .35s; }
  .js .bcards-p .pcard--ov:has(.media.is-in) .pcard__info { opacity: 1; }
}
.bcards-p .pcard--ov .pcard__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* no photos yet: the "coming soon" note goes to the top, the title keeps the bottom */
.bcards-p .pcard--ov .noimg > span { top: clamp(12px, 1.3vw, 20px); bottom: auto; left: clamp(14px, 1.4vw, 22px); right: auto; text-align: left; font-size: 12.5px; }
.bcards-p .pcard--ov .noimg .logo-symbol { width: 40%; transform: translateY(-8%); }
.bcards-p.cards--4 .pcard--ov .pcard__title { font-size: clamp(17px, 1.25vw, 21px); }

/* a single project: one wide feature row — photo (cols 1–7) and its text (cols 9–12), centred against it */
.bpfeat { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 1fr auto auto auto auto 1fr; column-gap: var(--gap); }
.bpfeat .media { grid-column: 1 / span 7; grid-row: 1 / -1; margin: 0; }
.bpfeat .pcard__arrow { display: none; }
.bpfeat .pcard__meta, .bpfeat .pcard__title, .bpfeat__ex, .bpfeat__go { grid-column: 9 / span 4; }
.bpfeat .pcard__meta { grid-row: 2; margin-bottom: 12px; }
.bpfeat .pcard__title { grid-row: 3; font-size: clamp(24px, 2.15vw, 34px); line-height: 1.16; }
html[lang="ka"] .bpfeat .pcard__title { line-height: 1.26; }
.bpfeat__ex { grid-row: 4; margin-top: 16px; color: var(--text-2); font-size: clamp(15px, 1.05vw, 17px); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.bpfeat__go { grid-row: 5; margin-top: 22px; display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-size: 14px; font-weight: 500; }
.bpfeat__go .arr { width: 14px; height: 14px; flex: none; transition: transform .6s var(--ease); }
.bpfeat:hover .bpfeat__go .arr { transform: translate(3px, -3px); }

/* ---------- related articles ---------- */
.bposts .post-card__title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bposts.cards--2 .post-card .media { aspect-ratio: 16 / 9; }
/* a single article: the mirror of the project feature — text (cols 1–4), photo (cols 6–12) */
.bposts--one .post-card { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 1fr auto auto auto 1fr; column-gap: var(--gap); row-gap: 0; }
.bposts--one .post-card .media { grid-column: 6 / span 7; grid-row: 1 / -1; aspect-ratio: 16 / 9; }
.bposts--one .post-card__meta, .bposts--one .post-card__title, .bposts--one .post-card__ex { grid-column: 1 / span 4; }
.bposts--one .post-card__meta { grid-row: 2; }
.bposts--one .post-card__title { grid-row: 3; margin-top: 14px; font-size: clamp(22px, 1.95vw, 31px); line-height: 1.2; -webkit-line-clamp: 4; }
html[lang="ka"] .bposts--one .post-card__title { line-height: 1.3; }
.bposts--one .post-card__ex { grid-row: 4; margin-top: 14px; font-size: clamp(15px, 1.05vw, 17px); -webkit-line-clamp: 5; }

/* ---------- closing enquiry band on the brand photo ----------
   Reveals from the light page (clip-path, data-reveal="img"); until the photo has loaded the band stays
   light with dark text, then the tint and white type fade in with the photo — never a navy box first. */
.bband {
  position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; align-content: end;
  min-height: clamp(340px, calc(var(--vh, 1vh) * 46), 470px); padding: clamp(22px, 3vw, 48px); border-radius: var(--radius); overflow: hidden; isolation: isolate;
  background: var(--mist-3); color: var(--ink); transition: color .9s var(--ease);
}
.bband > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.bband::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1s var(--ease);
  background: linear-gradient(180deg, rgba(20, 28, 45, .3) 0%, rgba(20, 28, 45, .5) 48%, rgba(20, 28, 45, .82) 100%), linear-gradient(90deg, rgba(20, 28, 45, .3), rgba(20, 28, 45, 0) 70%);
}
.bband:has(> img.is-loaded) { color: var(--white); }
.bband:has(> img.is-loaded)::after { opacity: 1; }
@supports not selector(:has(*)) { .bband { color: var(--white); } .bband::after { opacity: 1; } }
.bband__main { grid-column: 1 / span 7; }
.bband .marker { display: flex; margin-bottom: clamp(14px, 1.4vw, 20px); color: inherit; opacity: .78; }
.bband__title { max-width: 15em; }
.bband__side { grid-column: 9 / span 4; }
.bband__text { font-size: 15px; line-height: 1.6; opacity: .84; max-width: 26em; }
.bband__btn { margin-top: 22px; }

/* not found */
.bnf__text { margin-top: 16px; max-width: 520px; }
.bnf__btn { margin-top: 26px; }

@media (max-width: 1180px) {
  .bpfeat .pcard__meta, .bpfeat .pcard__title, .bpfeat__ex, .bpfeat__go { grid-column: 8 / span 5; padding-left: clamp(8px, 1.6vw, 20px); }
  .bposts--one .post-card__meta, .bposts--one .post-card__title, .bposts--one .post-card__ex { grid-column: 1 / span 5; padding-right: clamp(8px, 1.6vw, 20px); }
  .bband__main { grid-column: 1 / span 7; }
  .bband__side { grid-column: 8 / span 5; padding-left: clamp(8px, 1.6vw, 20px); }
}
/* five cards on desktop: 3 + 2 on a six-column grid, the wider second row keeps the same card height */
@media (min-width: 1025px) {
  .bcards-p.is-five { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bcards-p.is-five > * { grid-column: span 2; }
  .bcards-p.is-five > :nth-child(n+4) { grid-column: span 3; }
  .bcards-p.is-five > :nth-child(n+4) .media { aspect-ratio: 2 / 1; }
}
/* tablets: three articles stay one row of three (two columns would leave a hole) */
@media (min-width: 761px) and (max-width: 1024px) {
  .bposts.cards:not(.cards--2) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bposts.cards:not(.cards--2) .post-card__title { font-size: 17px; }
}
/* two columns on tablets: an odd last card spans the full row instead of leaving a hole */
@media (min-width: 641px) and (max-width: 1024px) {
  .bcards-p.is-odd > :last-child { grid-column: 1 / -1; }
  .bcards-p.is-odd > :last-child .media { aspect-ratio: 21 / 9; }
}
@media (max-width: 900px) {
  .bhero__logo { grid-column: 1 / -1; min-height: 0; aspect-ratio: 5 / 2; }
  .bhero__info { grid-column: 1 / -1; margin-top: 22px; padding: 0; }
  .bhero__info > .marker { display: none; }
  .babout { align-items: start; }
  .babout__text, .babout .bspec, .babout--notext .bspec { grid-column: 1 / -1; padding-left: 0; }
  .babout__text { max-width: 46em; }
  .babout .bspec { margin-top: clamp(22px, 3vw, 30px); max-height: none; }
  .bspec__row { flex: none; grid-template-columns: minmax(0, 36%) minmax(0, 1fr); }
  .bpfeat { grid-template-rows: none; }
  .bpfeat .media, .bpfeat .pcard__meta, .bpfeat .pcard__title, .bpfeat__ex, .bpfeat__go { grid-column: 1 / -1; grid-row: auto; padding-left: 0; }
  .bpfeat .media { margin-bottom: 16px; }
  .bposts--one .post-card { grid-template-rows: none; }
  .bposts--one .post-card .media, .bposts--one .post-card__meta, .bposts--one .post-card__title, .bposts--one .post-card__ex { grid-column: 1 / -1; grid-row: auto; padding-right: 0; }
  .bposts--one .post-card .media { grid-row: 1; margin-bottom: 14px; }
  .bposts--one .post-card__title { margin-top: 10px; }
  .bband { min-height: clamp(380px, 62vw, 460px); }
  .bband__main, .bband__side { grid-column: 1 / -1; padding-left: 0; }
  .bband__side { margin-top: 16px; }
}
/* rails are a phone thing: their dots stay hidden elsewhere */
.brail-dots { display: none; }

/* ==========================================================================
   brand.html on phones: a compact hero, readable facts, projects and articles as swipe rails
   ========================================================================== */
@media (max-width: 760px) {
  /* hero: a shorter logo panel, the name, one meta line, products, then disciplines + website */
  .bhero .crumbs { margin-bottom: 16px; }
  .bhero__logo { aspect-ratio: 12 / 5; }
  .bhero__logo::after { inset: 10px; }
  .bhero__mark { inset: 24% 15%; }
  .bhero__mark.has-ar { width: min(70%, calc(var(--mw) * 1.3)); max-height: 50%; }
  .bhero__mark:has(> img):not(.has-ar) { inset: 26% 24%; }
  .bhero__info { margin-top: 18px; }
  .bhero__name { font-size: clamp(32px, 9.6vw, 40px); }
  .bhero__meta { margin-top: 8px; font-size: 15px; }
  .bhero__prod { margin-top: 4px; font-size: 16.5px; line-height: 1.45; }
  .bhero__foot { margin-top: 16px; padding-top: 14px; gap: 12px 18px; }
  /* tags and the website link keep their look but get a finger-sized hit area */
  .bhero__tag, .bhero__site { position: relative; }
  .bhero__tag::after, .bhero__site::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
  .bhero__site { font-size: 15px; }

  /* about: the lead a touch smaller; the facts stacked label-over-value, short ones side by side in one strip */
  .babout { --lead: 18px; --lead-lh: 1.52; }
  .babout--s { --lead: 19.5px; --lead-lh: 1.46; }
  .babout--xs { --lead: 21px; --lead-lh: 1.4; }
  .babout .bspec { flex-direction: row; flex-wrap: wrap; margin-top: 26px; }
  .bspec__row { flex: 1 0 100%; display: flex; flex-direction: column; gap: 5px; padding: 13px 0 14px; }
  .bspec__row--cell { order: -1; flex: 1 1 0; min-width: 0; justify-content: space-between; padding-right: 10px; } /* values level even when a label wraps */
  .bspec__row--sep { padding-left: 14px; border-left: 1px solid var(--line); }
  .bspec dt { padding-top: 0; }
  .bspec dd { font-size: 15.5px; line-height: 1.5; }
  .bspec dd a::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); } /* "16 projects": a finger-sized hit area */

  /* section heads: the "all" link sits under the title, a full tap target */
  .bsec .sec-head__aside { margin-top: 14px; }
  .bsec .sec-head__aside .btn--sm { height: 44px; }
  .bsec .sec-head__aside .sec-link::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }

  /* projects and articles: horizontal snap rails with dots (like the home page), never a long vertical stack */
  .brail {
    display: flex; grid-template-columns: none; gap: 10px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-left: var(--pad); scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin: 0 calc(var(--pad) * -1); padding: 0 0 4px var(--pad);
  }
  .brail::-webkit-scrollbar { display: none; }
  /* the end gap is a real (pseudo) item: browsers disagree on whether end padding of a scroller counts */
  .brail::after { content: ""; flex: 0 0 calc(var(--pad) - 10px); }
  .brail > * { flex: 0 0 calc((100vw - var(--pad) * 2) * .8); min-width: 0; scroll-snap-align: start; }
  .bcards-p.brail .pcard--ov .media, .bcards-p.brail.is-odd > :last-child .media { aspect-ratio: 4 / 5; }
  .bcards-p.brail .pcard--ov .pcard__title { font-size: 19px; }
  .bposts.brail .post-card .media { aspect-ratio: 16 / 10; }
  .bposts.brail .post-card__meta { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
  .bposts.brail .post-card__meta > :nth-child(n+4) { display: none; } /* topic · date; the read time would wrap */
  .bposts.brail .post-card__title { font-size: 17px; line-height: 1.34; }
  html[lang="ka"] .bposts.brail .post-card__title { line-height: 1.4; }
  .bposts.brail .post-card__ex { -webkit-line-clamp: 2; font-size: 15px; line-height: 1.55; }
  .brail-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
  .brail-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--mist-2); transition: background-color .3s, transform .3s var(--ease); }
  .brail-dots i.is-on { background: var(--ink); transform: scale(1.25); }

  /* one project / one article: a single full-width card */
  .bpfeat .media { aspect-ratio: 16 / 10; }
  .bposts--one .post-card .media { aspect-ratio: 16 / 10; }

  .bband { padding: 22px 20px 24px; }
}
